From ce3c672559349f6f5b025feea22ab8696e29922d Mon Sep 17 00:00:00 2001 From: Andrettin Date: Sat, 24 Feb 2018 22:38:41 +0100 Subject: [PATCH] Fixed issue which caused a crash when starting a second game --- src/stratagus/player.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/stratagus/player.cpp b/src/stratagus/player.cpp index 3fa49eb7e..927c1f91d 100644 --- a/src/stratagus/player.cpp +++ b/src/stratagus/player.cpp @@ -1570,6 +1570,8 @@ void CPlayer::Init(/* PlayerTypes */ int type) this->UnitTypesAiActiveCount.clear(); this->Heroes.clear(); this->Deities.clear(); + this->UnitsByType.clear(); + this->AiActiveUnitsByType.clear(); //Wyrmgus end this->Supply = 0; @@ -2491,6 +2493,8 @@ void CPlayer::Clear() //Wyrmgus start this->Heroes.clear(); this->Deities.clear(); + this->UnitsByType.clear(); + this->AiActiveUnitsByType.clear(); this->AvailableQuests.clear(); this->CurrentQuests.clear(); this->CompletedQuests.clear();