diff options
| author | Warner Losh <imp@FreeBSD.org> | 1998-01-07 00:12:04 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 1998-01-07 00:12:04 +0000 |
| commit | 2959539268d55dad8fed6056eff7a41130e47b08 (patch) | |
| tree | 26e81321532e1d35c0ae14fd037d7692124a061a | |
| parent | 545b0f4db7001f3aa09c501144247e7dc67d7b38 (diff) | |
Notes
| -rw-r--r-- | games/phantasia/main.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/games/phantasia/main.c b/games/phantasia/main.c index 3ed01ddd344e..f412d0939ef3 100644 --- a/games/phantasia/main.c +++ b/games/phantasia/main.c @@ -1277,10 +1277,22 @@ bool doexit; endwin(); } - fclose(Playersfp); - fclose(Monstfp); - fclose(Messagefp); - fclose(Energyvoidfp); + if (Playersfp) { + fclose(Playersfp); + Playersfp = NULL; + } + if (Monstfp) { + fclose(Monstfp); + Monstfp = NULL; + } + if (Messagefp) { + fclose(Messagefp); + Messagefp = NULL; + } + if (Energyvoidfp) { + fclose(Energyvoidfp); + Energyvoidfp = NULL; + } if (doexit) exit(0); |
