mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-19 23:00:59 +00:00
delete ast_members from parser->locals when they were unused
This commit is contained in:
parent
e86c8ff0eb
commit
cdeffb6de9
1 changed files with 5 additions and 0 deletions
5
parser.c
5
parser.c
|
@ -1668,6 +1668,11 @@ static void parser_pop_local(parser_t *parser)
|
|||
{
|
||||
parser->locals_count--;
|
||||
mem_d(parser->locals[parser->locals_count].name);
|
||||
if (!ast_usecount(parser->locals[parser->locals_count].var) &&
|
||||
ast_istype(parser->locals[parser->locals_count].var, ast_member))
|
||||
{
|
||||
ast_delete(parser->locals[parser->locals_count].var);
|
||||
}
|
||||
}
|
||||
|
||||
static ast_block* parser_parse_block(parser_t *parser)
|
||||
|
|
Loading…
Reference in a new issue