From 6def61dfe982fe508ba19dd35aca0013079b4bff Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Mon, 13 Feb 2012 11:42:58 -0800 Subject: [PATCH] A bit more debugging to parser class to try to track down a crash --- parser.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/parser.h b/parser.h index 10efc69b8..0e7318553 100644 --- a/parser.h +++ b/parser.h @@ -93,7 +93,7 @@ typedef struct block int if_state; /**< The state of the if block, can be one of IF_STATE_UNTESTED, IF_STATE_FALSE, IF_STATE_TRUE */ wchar_t *switch_value; /**< The value to test in a switch block */ const wchar_t *source_dest; /**< The name of the file to source*/ - event_t *event; /** *>(state1_ptr); - assert(state != NULL); + if (state == NULL) { + printf("Expected type %s, but instead got type %s\n", typeid(T).name(), typeid(*state1_ptr).name()); + abort(); + } } return state->value; }