diff --git a/emul/forth/forth.c b/emul/forth/forth.c index 067618a..e177006 100644 --- a/emul/forth/forth.c +++ b/emul/forth/forth.c @@ -118,7 +118,9 @@ int main(int argc, char *argv[]) tcsetattr(0, TCSAFLUSH, &termInfo); emul_printdebug(); } - fclose(blkfp); + if (blkfp != NULL) { + fclose(blkfp); + } fclose(fp); return retcode; }