1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-03 13:01:33 +02:00

CGMonolith: fix crash on initialization here too

This commit is contained in:
Arseniy Shestakov 2017-07-14 16:50:29 +03:00
parent 77ca27b90b
commit 98406d127d

View File

@ -1044,6 +1044,9 @@ TeleportChannelID CGMonolith::findMeChannel(std::vector<Obj> IDs, int SubID) con
{
for(auto obj : cb->gameState()->map->objects)
{
if(!obj)
continue;
auto teleportObj = dynamic_cast<const CGTeleport *>(cb->getObj(obj->id));
if(teleportObj && vstd::contains(IDs, teleportObj->ID) && teleportObj->subID == SubID)
return teleportObj->channel;