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:
parent
00b0af7306
commit
5c6633f8ad
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user