From 460338e01bb7249971a168e1170f388063e2b3a0 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Fri, 14 Dec 2007 09:50:38 +0000 Subject: [PATCH] Do not crash, when the body of an switch statement is empty. [r18739] --- ast2firm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(); -- 2.20.1