mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-17 09:02:25 +00:00
If-protect on_true and on_false in ast_ifthen since they can be NULL (contrary to ast_ternary where they can't)
This commit is contained in:
parent
bbcd3f12de
commit
3e974a1a24
1 changed files with 4 additions and 2 deletions
6
ast.c
6
ast.c
|
@ -238,8 +238,10 @@ ast_ifthen* ast_ifthen_new(lex_ctx ctx, ast_expression *cond, ast_expression *on
|
|||
void ast_ifthen_delete(ast_ifthen *self)
|
||||
{
|
||||
ast_unref(self->cond);
|
||||
ast_unref(self->on_true);
|
||||
ast_unref(self->on_false);
|
||||
if (self->on_true)
|
||||
ast_unref(self->on_true);
|
||||
if (self->on_flase)
|
||||
ast_unref(self->on_false);
|
||||
ast_expression_delete((ast_expression*)self);
|
||||
mem_d(self);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue