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