mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-17 09:02:25 +00:00
ast_return_delete: check if self->operand is actually set before ast_unref-ing it
This commit is contained in:
parent
586bb07c4d
commit
b7b0fcdc94
1 changed files with 2 additions and 1 deletions
3
ast.c
3
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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue