From 951c4e12e070466ebc54cb8e62f44676504dc9f5 Mon Sep 17 00:00:00 2001 From: scrawl Date: Fri, 30 Jun 2017 00:51:26 +0200 Subject: [PATCH] Fix crash introduced by commit 1d8a9ff62243cb6b8e218840d839e6d554f3e8d9 (Fixes #3940) --- apps/openmw/mwworld/worldimp.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 815810d36..6c9cdb394 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -379,8 +379,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) &&