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:
parent
77ca27b90b
commit
98406d127d
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user