Skip to content

Commit

Permalink
Fix crash (#10966)
Browse files Browse the repository at this point in the history
  • Loading branch information
KungCheops authored Jun 10, 2024
1 parent 271f372 commit 1b5dc6a
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions CvGameCoreDLL_Expansion2/CvMinorCivAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit 1b5dc6a

Please sign in to comment.