From: Wolfgang (Blub) Bumiller Date: Wed, 21 Nov 2012 19:57:00 +0000 (+0100) Subject: ast_ternary needs to adopt the output type X-Git-Tag: 0.1.9~364 X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=commitdiff_plain;h=e20184ae5958fb411deb1f236c07327326012b10;hp=9c8dc43775285c0056ab539a436b013c7933bc76 ast_ternary needs to adopt the output type --- diff --git a/ast.c b/ast.c index f6a5d87..7d7443f 100644 --- a/ast.c +++ b/ast.c @@ -652,6 +652,11 @@ ast_ternary* ast_ternary_new(lex_ctx ctx, ast_expression *cond, ast_expression * self->on_true = ontrue; self->on_false = onfalse; + if (!ast_type_adopt(self, ontrue)) { + ast_ternary_delete(self); + return NULL; + } + return self; }