From 57866a8359079b9cd23ae5a172812e1bc9d08f50 Mon Sep 17 00:00:00 2001 From: Alexey Prokhin Date: Fri, 31 Dec 2010 13:45:11 +0300 Subject: [PATCH] Fixed a crash in WithStatement::toIR. --- gen/statements.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gen/statements.cpp b/gen/statements.cpp index 78e08c87..52d4ec1c 100644 --- a/gen/statements.cpp +++ b/gen/statements.cpp @@ -1442,7 +1442,6 @@ void WithStatement::toIR(IRState* p) #endif assert(exp); - assert(body); // with(..) can either be used with expressions or with symbols // wthis == null indicates the symbol form @@ -1452,7 +1451,8 @@ void WithStatement::toIR(IRState* p) DtoStore(e->getRVal(), mem); } - body->toIR(p); + if (body) + body->toIR(p); } //////////////////////////////////////////////////////////////////////////////