Don't crash when deleting or disabling a moving door

actorid
scrawl 11 years ago
parent 190512156d
commit a8a09762ce

@ -1153,7 +1153,7 @@ namespace MWWorld
std::map<MWWorld::Ptr, int>::iterator it = mDoorStates.begin();
while (it != mDoorStates.end())
{
if (!mWorldScene->isCellActive(*it->first.getCell()))
if (!mWorldScene->isCellActive(*it->first.getCell()) || !it->first.getRefData().getBaseNode())
mDoorStates.erase(it++);
else
{

Loading…
Cancel
Save