From cabc236a797ae8e7d9f509a1e570616c22a75b28 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Sat, 13 Dec 2008 06:48:00 +0100 Subject: [PATCH] Only emit finalbody if there is one. Fixes #147. --- gen/llvmhelpers.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gen/llvmhelpers.cpp b/gen/llvmhelpers.cpp index 2c3ed2a9..4e821ca8 100644 --- a/gen/llvmhelpers.cpp +++ b/gen/llvmhelpers.cpp @@ -246,8 +246,8 @@ EnclosingHandler* EnclosingVolatile::getEnclosing() void EnclosingTryFinally::emitCode(IRState * p) { - assert(tf->finalbody); - tf->finalbody->toIR(p); + if (tf->finalbody) + tf->finalbody->toIR(p); } EnclosingHandler* EnclosingTryFinally::getEnclosing()