From: Christoph Mallon Date: Fri, 14 Dec 2007 09:50:38 +0000 (+0000) Subject: Do not crash, when the body of an switch statement is empty. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=460338e01bb7249971a168e1170f388063e2b3a0;p=cparser Do not crash, when the body of an switch statement is empty. [r18739] --- diff --git a/ast2firm.c b/ast2firm.c index ac69667..c9a1d8c 100644 --- a/ast2firm.c +++ b/ast2firm.c @@ -3386,7 +3386,9 @@ static void switch_statement_to_firm(const switch_statement_t *statement) current_switch_cond = cond; break_label = break_block; - statement_to_firm(statement->body); + if (statement->body != NULL) { + statement_to_firm(statement->body); + } if(get_cur_block() != NULL) { ir_node *jmp = new_Jmp();