diff --git a/src/tools/tc_utils/tc_stat/tc_stat_job.cc b/src/tools/tc_utils/tc_stat/tc_stat_job.cc index 59689f6d24..24ab12f217 100644 --- a/src/tools/tc_utils/tc_stat/tc_stat_job.cc +++ b/src/tools/tc_utils/tc_stat/tc_stat_job.cc @@ -237,6 +237,7 @@ void TCStatJob::clear() { StatFile.clear(); close_stat_file(); StatOut = (ofstream *) 0; + stat_row = 0; // Set to default values WaterOnly = default_water_only; @@ -1169,6 +1170,8 @@ void TCStatJob::open_stat_file() { close_stat_file(); + stat_row = 0; + if(StatFile.empty()) return; StatOut = new ofstream;