From: Wolfgang (Blub) Bumiller Date: Sat, 18 Aug 2012 16:00:20 +0000 (+0200) Subject: Use the current context, not the one from a NULL value... for ast_return X-Git-Tag: 0.1-rc1~190 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=586bb07c4d0b1307a2e658abf578467dff8161b6;p=xonotic%2Fgmqcc.git Use the current context, not the one from a NULL value... for ast_return --- diff --git a/parser.c b/parser.c index a901c40..5fb8765 100644 --- a/parser.c +++ b/parser.c @@ -1618,7 +1618,7 @@ static bool parser_parse_statement(parser_t *parser, ast_block *block, ast_expre if (expected->expression.next->expression.vtype != TYPE_VOID) { parseerror(parser, "return without value"); } - ret = ast_return_new(exp->expression.node.context, NULL); + ret = ast_return_new(parser_ctx(parser), NULL); } *out = (ast_expression*)ret; return true;