From 8efde8d38d79e2b93802276ba3b351cce5420aff Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Wed, 13 Aug 2008 20:50:54 +0200 Subject: [PATCH] Do not assert if there's a struct-this nested context. --- gen/llvmhelpers.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gen/llvmhelpers.cpp b/gen/llvmhelpers.cpp index 20503f81..69d94ec7 100644 --- a/gen/llvmhelpers.cpp +++ b/gen/llvmhelpers.cpp @@ -398,8 +398,7 @@ LLValue* DtoNestedContext(Loc loc, Dsymbol* sym) 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"));