]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - parser.c
Update clean rules in makefiles to remove coverity stuff
[xonotic/gmqcc.git] / parser.c
index 03b8a8677bf3bf14f72bfab2e14affa51e2b2229..6216997879e461e4c759cb17ec2959b9e362f5aa 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -3622,7 +3622,8 @@ static bool parse_goto(parser_t *parser, ast_expression **out)
         if (!(expression = parse_expression(parser, false, true)) ||
             !(*out = parse_goto_computed(parser, &expression))) {
             parseerror(parser, "invalid goto expression");
-            ast_unref(expression);
+            if(expression)
+                ast_unref(expression);
             return false;
         }
 
@@ -6303,8 +6304,9 @@ parser_t *parser_create()
     vec_push(parser->correct_variables, correct_trie_new());
     vec_push(parser->correct_variables_score, NULL);
 
-    empty_ctx.file = "<internal>";
-    empty_ctx.line = 0;
+    empty_ctx.file   = "<internal>";
+    empty_ctx.line   = 0;
+    empty_ctx.column = 0;
     parser->nil = ast_value_new(empty_ctx, "nil", TYPE_NIL);
     parser->nil->cvq = CV_CONST;
     if (OPTS_FLAG(UNTYPED_NIL))