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,6 +260,7 @@ namespace MWWorld
if (mPlayer)
{
mPlayer->clear();
mPlayer->setCell(0);
mPlayer->getPlayer().getRefData() = RefData();
mPlayer->set(mStore.get<ESM::NPC>().find ("player"));