1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Fix crash on loading map with heroes that have combined art equipped

This commit is contained in:
Ivan Savenko
2025-05-07 18:05:30 +03:00
parent 92c4bcbf68
commit 69de14a42f
5 changed files with 27 additions and 21 deletions

View File

@@ -873,7 +873,7 @@ const std::vector<ObjectInstanceID> & CMap::getHeroesOnMap()
void CMap::addToHeroPool(std::shared_ptr<CGHeroInstance> hero)
{
assert(hero->getHeroTypeID().isValid());
assert(!vstd::contains(heroesOnMap, hero->getHeroTypeID()));
assert(!vstd::contains(heroesOnMap, hero->id));
assert(heroesPool.at(hero->getHeroTypeID().getNum()) == nullptr);
heroesPool.at(hero->getHeroTypeID().getNum()) = hero;