]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - parser.c
set parser->lex to NULL after closing
[xonotic/gmqcc.git] / parser.c
index 4b3ac5188bbc1c029cafe60aa363eee471fee150..a084e2f05ca32130bdc6b70808cb7562225e7f88 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -2234,12 +2234,14 @@ bool parser_compile(const char *filename)
                 else if (!parser->errors)
                     parseerror(parser, "parse error\n");
                 lex_close(parser->lex);
+                parser->lex = NULL;
                 return false;
             }
         }
     }
 
     lex_close(parser->lex);
+    parser->lex = NULL;
 
     return !parser->errors;
 }