1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

CPathfinder::addTeleportWhirlpool: check that obj isn't nullptr

This commit is contained in:
ArseniyShestakov 2015-03-09 15:32:09 +03:00
parent 00b0af7306
commit 5c6633f8ad

View File

@ -3595,5 +3595,5 @@ bool CPathfinder::addTeleportOneWayRandom(const CGTeleport * obj) const
bool CPathfinder::addTeleportWhirlpool(const CGWhirlpool * 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);
} }