# HG changeset patch # User Tomas Lindquist Olsen # Date 1217633033 -7200 # Node ID 60332cd8530875c9a4e11bbda137758b8116091a # Parent 30ef3c7bddca93a4aefa26b3af1e4db2f8121045 Fixed regressions diff -r 30ef3c7bddca -r 60332cd85308 gen/llvmhelpers.cpp --- a/gen/llvmhelpers.cpp Sat Aug 02 00:50:39 2008 +0200 +++ b/gen/llvmhelpers.cpp Sat Aug 02 01:23:53 2008 +0200 @@ -485,6 +485,12 @@ LLValue* ptr = DtoNestedContext(func); assert(ptr && "nested var, but no context"); + // if there is no nestedVar the context itself is what we're after + if (!func->ir.irFunc->nestedVar) + { + return ptr; + } + // handle a "normal" nested variable // we must cast here to be sure. nested classes just have a void*