From 4bf1c9a9a354857ae79e21b2c390aca7b10fde06 Mon Sep 17 00:00:00 2001 From: Arseniy Shestakov Date: Fri, 14 Jul 2017 15:34:52 +0300 Subject: [PATCH] Campaigns: fix crash on CMap::instanceNames serialization --- lib/CGameState.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/CGameState.cpp b/lib/CGameState.cpp index 69aa1d44e..fe965f8e8 100644 --- a/lib/CGameState.cpp +++ b/lib/CGameState.cpp @@ -1040,6 +1040,7 @@ void CGameState::placeCampaignHeroes() { auto heroPlaceholder = dynamic_cast(obj.get()); map->removeBlockVisTiles(heroPlaceholder, true); + map->instanceNames.erase(obj->instanceName); map->objects[heroPlaceholder->id.getNum()] = nullptr; delete heroPlaceholder; }