changeset 505:841589c97f20

Do not assert if there's a struct-this nested context.
author Christian Kamm <kamm incasoftware de>
date Wed, 13 Aug 2008 20:50:54 +0200
parents 577211114d6d
children a6c105aa00d5
files gen/llvmhelpers.cpp
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gen/llvmhelpers.cpp	Wed Aug 13 17:11:03 2008 +0200
+++ b/gen/llvmhelpers.cpp	Wed Aug 13 20:50:54 2008 +0200
@@ -398,8 +398,7 @@
     else if (irfunc->thisArg)
     {
         ClassDeclaration* cd = irfunc->decl->isMember2()->isClassDeclaration();
-        assert(cd);
-        if (!cd->vthis)
+        if (!cd || !cd->vthis)
             return getNullPtr(getVoidPtrType());
         LLValue* val = DtoLoad(irfunc->thisArg);
         return DtoLoad(DtoGEPi(val, 0,2+cd->vthis->ir.irField->index, ".vthis"));