diff --git a/gen/toir.cpp b/gen/toir.cpp index d4022439..540b87d5 100644 --- a/gen/toir.cpp +++ b/gen/toir.cpp @@ -2095,7 +2095,7 @@ DValue* OrOrExp::toElem(IRState* p) DValue* v = e2->toElem(p); LLValue* vbool = 0; - if (!v->isFunc() && v->getType() != Type::tvoid) + if (v && !v->isFunc() && v->getType() != Type::tvoid) { vbool = DtoCast(loc, v, Type::tbool)->getRVal(); }