From 1b5dc6ae2a7d9a9f541f6008f53a5fdb04c91e90 Mon Sep 17 00:00:00 2001 From: KungCheops Date: Mon, 10 Jun 2024 18:15:00 +0200 Subject: [PATCH] Fix crash (#10966) --- CvGameCoreDLL_Expansion2/CvMinorCivAI.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/CvGameCoreDLL_Expansion2/CvMinorCivAI.cpp b/CvGameCoreDLL_Expansion2/CvMinorCivAI.cpp index baac247668..a49d0cc6fe 100644 --- a/CvGameCoreDLL_Expansion2/CvMinorCivAI.cpp +++ b/CvGameCoreDLL_Expansion2/CvMinorCivAI.cpp @@ -6424,13 +6424,7 @@ void CvMinorCivAI::DoQuestsCleanupForPlayer(PlayerTypes ePlayer) bGlobalQuestDone = true; // Store the next iterator before erasing the current element - QuestListForPlayer::iterator next_itr = itr_quest; - ++next_itr; - - m_QuestsGiven[ePlayer].erase(itr_quest); - - // Move to the next valid iterator - itr_quest = next_itr; + itr_quest = m_QuestsGiven[ePlayer].erase(itr_quest); } else {