Skip to content

Commit

Permalink
Fix crash introduced by commit 1d8a9ff (Fixes #3940)
Browse files Browse the repository at this point in the history
  • Loading branch information
scrawl committed Jun 29, 2017
1 parent ec458ef commit 9c94244
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions apps/openmw/mwworld/worldimp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,11 @@ namespace MWWorld
return;
case ESM::REC_PLAY:
mPlayer->readRecord(reader, type);
mWorldScene->preloadCell(getPlayerPtr().getCell(), true);
mWorldScene->preloadTerrain(getPlayerPtr().getRefData().getPosition().asVec3());
if (getPlayerPtr().isInCell())
{
mWorldScene->preloadCell(getPlayerPtr().getCell(), true);
mWorldScene->preloadTerrain(getPlayerPtr().getRefData().getPosition().asVec3());
}
break;
default:
if (!mStore.readRecord (reader, type) &&
Expand Down

0 comments on commit 9c94244

Please sign in to comment.