From 711ff74bb753a6c4cca2c7cf0525a07d46ba828a Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Wed, 5 Dec 2007 16:00:21 +0000 Subject: [PATCH] BugFix: expression may be NULL in count_decls_in_expr() [r18609] --- ast2firm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ast2firm.c b/ast2firm.c index 2758bf0..ec6afd7 100644 --- a/ast2firm.c +++ b/ast2firm.c @@ -3111,7 +3111,7 @@ static int count_local_declarations(const declaration_t * decl, } static int count_decls_in_expr(const expression_t *expr) { - if (expr->base.type == EXPR_STATEMENT) + if (expr != NULL && expr->base.type == EXPR_STATEMENT) return count_decls_in_stmts(expr->statement.statement); return 0; } -- 2.20.1