]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
set parser->lex to NULL after closing
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sat, 18 Aug 2012 14:42:17 +0000 (16:42 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sat, 18 Aug 2012 14:42:17 +0000 (16:42 +0200)
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;
 }