fix a corner case in conditional debug parsing

This commit is contained in:
zeromus 2011-03-17 23:01:55 +00:00
parent ad91be1ad3
commit 38bca0ae1a
1 changed files with 4 additions and 3 deletions

View File

@ -91,13 +91,14 @@ Condition* InfixOperator(const char** str, Condition(*nextPart(const char**)), i
if (t1 == 0) if (t1 == 0)
{ {
freeTree(t); if(t)
freeTree(t);
return 0; return 0;
} }
mid = (Condition*)FCEU_dmalloc(sizeof(Condition)); mid = (Condition*)FCEU_dmalloc(sizeof(Condition));
if (!mid) if (!mid)
return NULL; return NULL;
memset(mid, 0, sizeof(Condition)); memset(mid, 0, sizeof(Condition));
mid->lhs = t; mid->lhs = t;