From: Wolfgang (Blub) Bumiller Date: Sat, 18 Aug 2012 16:01:52 +0000 (+0200) Subject: ast_return_delete: check if self->operand is actually set before ast_unref-ing it X-Git-Tag: 0.1-rc1~189 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b7b0fcdc948ad9036b0ff8df3b002a4feaf0878f;p=xonotic%2Fgmqcc.git ast_return_delete: check if self->operand is actually set before ast_unref-ing it --- diff --git a/ast.c b/ast.c index fb1bc87..89ae7ac 100644 --- a/ast.c +++ b/ast.c @@ -344,7 +344,8 @@ ast_return* ast_return_new(lex_ctx ctx, ast_expression *expr) void ast_return_delete(ast_return *self) { - ast_unref(self->operand); + if (self->operand) + ast_unref(self->operand); ast_expression_delete((ast_expression*)self); mem_d(self); }