mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
#3142 - fi custom campaign selection screen
This commit is contained in:
@@ -1530,7 +1530,7 @@ void CGHeroInstance::afterAddToMap(CMap * map)
|
||||
{
|
||||
auto existingHero = std::find_if(map->objects.begin(), map->objects.end(), [&](const CGObjectInstance * o) ->bool
|
||||
{
|
||||
return (o->ID == Obj::HERO || o->ID == Obj::PRISON) && o->subID == subID && o != this;
|
||||
return o && (o->ID == Obj::HERO || o->ID == Obj::PRISON) && o->subID == subID && o != this;
|
||||
});
|
||||
|
||||
if(existingHero != map->objects.end())
|
||||
|
||||
Reference in New Issue
Block a user