1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00

Check cell for null

This commit is contained in:
Andrei Kortunov 2018-06-25 10:26:58 +04:00
parent 441463327c
commit 7dff8d8fe2

View File

@ -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);