1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Campaigns: fix crash on CMap::instanceNames serialization

This commit is contained in:
Arseniy Shestakov 2017-07-14 15:34:52 +03:00
parent ee7862b12f
commit 4bf1c9a9a3

View File

@ -1040,6 +1040,7 @@ void CGameState::placeCampaignHeroes()
{
auto heroPlaceholder = dynamic_cast<CGHeroPlaceholder *>(obj.get());
map->removeBlockVisTiles(heroPlaceholder, true);
map->instanceNames.erase(obj->instanceName);
map->objects[heroPlaceholder->id.getNum()] = nullptr;
delete heroPlaceholder;
}