Fix a crash in OrOrExp::toElem

This commit is contained in:
Alexey Prokhin
2011-04-30 15:30:58 +04:00
parent 8da0d673cf
commit 6548ce2e79

View File

@@ -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();
}