Initialize all file pointers to NULL in initpointers

This commit is contained in:
Lew Rossman
2019-03-05 20:50:34 -05:00
parent 324487ba86
commit 8765dfa3ab
2 changed files with 8 additions and 2 deletions

View File

@@ -819,13 +819,13 @@ int DLLEXPORT EN_closeQ(EN_Project p)
if (!p->Openflag) return 102;
closequal(p);
p->quality.OpenQflag = FALSE;
/*
if (p->outfile.OutFile != NULL)
{
fclose(p->outfile.OutFile);
p->outfile.OutFile = NULL;
}
*/
return 0;
}

View File

@@ -265,6 +265,12 @@ void initpointers(Project *pr)
pr->hydraul.smatrix.XLNZ = NULL;
pr->hydraul.smatrix.NZSUB = NULL;
pr->hydraul.smatrix.LNZ = NULL;
pr->outfile.OutFile = NULL;
pr->outfile.HydFile = NULL;
pr->outfile.TmpOutFile = NULL;
pr->parser.InFile = NULL;
pr->report.RptFile = NULL;
initrules(pr);
}