diff gen/statements.cpp @ 181:ef4108f34db6 trunk

[svn r197] Fixed: empty scope statement segfaulted.
author lindquist
date Wed, 07 May 2008 19:34:41 +0200
parents c44e6a711885
children 89e21eeaf4c4
line wrap: on
line diff
--- a/gen/statements.cpp	Wed May 07 18:46:56 2008 +0200
+++ b/gen/statements.cpp	Wed May 07 19:34:41 2008 +0200
@@ -223,7 +223,8 @@
 
     gIR->scope() = IRScope(beginbb, endbb);
 
-    statement->toIR(p);
+    if (statement)
+        statement->toIR(p);
 
     p->scope() = IRScope(p->scopebb(),oldend);
     endbb->eraseFromParent();