From 5c6633f8ada40658bc08f08d313b4d21a0466430 Mon Sep 17 00:00:00 2001 From: ArseniyShestakov Date: Mon, 9 Mar 2015 15:32:09 +0300 Subject: [PATCH] CPathfinder::addTeleportWhirlpool: check that obj isn't nullptr --- lib/CGameState.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CGameState.cpp b/lib/CGameState.cpp index 4b64980a5..bf8b7d6d5 100644 --- a/lib/CGameState.cpp +++ b/lib/CGameState.cpp @@ -3595,5 +3595,5 @@ bool CPathfinder::addTeleportOneWayRandom(const CGTeleport * obj) const bool CPathfinder::addTeleportWhirlpool(const CGWhirlpool * obj) const { - return allowTeleportWhirlpool && !gs->isTeleportChannelImpassable(obj->channel, hero->tempOwner); + return allowTeleportWhirlpool && obj && !gs->isTeleportChannelImpassable(obj->channel, hero->tempOwner); }