From 7dff8d8fe28c6d3d95f9d3c90070ad757c7c84b3 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Mon, 25 Jun 2018 10:26:58 +0400 Subject: [PATCH] Check cell for null --- apps/openmw/mwworld/worldimp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 83d27f6d8..9de4da1ee 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -1179,8 +1179,8 @@ namespace MWWorld } else { - bool currCellActive = mWorldScene->isCellActive(*currCell); - bool newCellActive = mWorldScene->isCellActive(*newCell); + bool currCellActive = currCell && mWorldScene->isCellActive(*currCell); + bool newCellActive = newCell && mWorldScene->isCellActive(*newCell); if (!currCellActive && newCellActive) { newPtr = currCell->moveTo(ptr, newCell);