safeguard fclose

This commit is contained in:
Holger Vogt 2018-05-27 21:37:03 +02:00
parent 387e69c781
commit e5652cd745
1 changed files with 1 additions and 1 deletions

View File

@ -405,7 +405,7 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
/* if nothing came back from inp_readall, just close fp and return to caller */
if (!deck) {
if (!intfile)
if (!intfile && fp)
fclose(fp);
return;
}