Skip to content

Commit

Permalink
CPathfinder::addTeleportWhirlpool: check that obj isn't nullptr
Browse files Browse the repository at this point in the history
  • Loading branch information
ArseniyShestakov committed Mar 9, 2015
1 parent 00b0af7 commit 5c6633f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/CGameState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 5c6633f

Please sign in to comment.