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:
parent
ee7862b12f
commit
4bf1c9a9a3
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user