Fix a potential crash for lights without a model that have "off by default" flag set

pull/1/head
scrawl 9 years ago
parent a9561f738a
commit 44dd67ee0f

@ -1479,7 +1479,7 @@ namespace MWRender
if (ptr.getTypeName() == typeid(ESM::Light).name() && allowLight) if (ptr.getTypeName() == typeid(ESM::Light).name() && allowLight)
addExtraLight(getOrCreateObjectRoot(), ptr.get<ESM::Light>()->mBase); addExtraLight(getOrCreateObjectRoot(), ptr.get<ESM::Light>()->mBase);
if (!allowLight) if (!allowLight && mObjectRoot)
{ {
RemoveParticlesVisitor visitor; RemoveParticlesVisitor visitor;
mObjectRoot->accept(visitor); mObjectRoot->accept(visitor);

Loading…
Cancel
Save