Fix a possible crash due to a null pointer.

This commit is contained in:
Kevin Poitra 2014-05-28 12:58:45 -05:00
parent 251df73407
commit 16a6edbd0e

View file

@ -252,7 +252,6 @@ namespace MWWorld
mProjectileManager->clear();
mLocalScripts.clear();
mPlayer->clear();
mWorldScene->changeToVoid();
@ -261,9 +260,10 @@ namespace MWWorld
if (mPlayer)
{
mPlayer->setCell (0);
mPlayer->clear();
mPlayer->setCell(0);
mPlayer->getPlayer().getRefData() = RefData();
mPlayer->set (mStore.get<ESM::NPC>().find ("player"));
mPlayer->set(mStore.get<ESM::NPC>().find ("player"));
}
mCells.clear();