X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=parser.c;h=6216997879e461e4c759cb17ec2959b9e362f5aa;hb=e08f00bfcdc5bcd400d1bf37cff15f47b930521f;hp=03b8a8677bf3bf14f72bfab2e14affa51e2b2229;hpb=82fd7fcf68761d3a703a27ae8f49308a6d56ba2b;p=xonotic%2Fgmqcc.git diff --git a/parser.c b/parser.c index 03b8a86..6216997 100644 --- 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 = ""; - empty_ctx.line = 0; + empty_ctx.file = ""; + 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))