From 38bca0ae1ae7d047c971493532787189bf9cb493 Mon Sep 17 00:00:00 2001 From: zeromus Date: Thu, 17 Mar 2011 23:01:55 +0000 Subject: [PATCH] fix a corner case in conditional debug parsing --- src/conddebug.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/conddebug.cpp b/src/conddebug.cpp index 7a9a4ae6..7d377044 100644 --- a/src/conddebug.cpp +++ b/src/conddebug.cpp @@ -91,13 +91,14 @@ Condition* InfixOperator(const char** str, Condition(*nextPart(const char**)), i if (t1 == 0) { - freeTree(t); + if(t) + freeTree(t); return 0; } mid = (Condition*)FCEU_dmalloc(sizeof(Condition)); - if (!mid) - return NULL; + if (!mid) + return NULL; memset(mid, 0, sizeof(Condition)); mid->lhs = t;