From 49cadf79023016ce534c0137c53d342c0f23e875 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Tue, 5 Nov 2024 10:40:32 +1100 Subject: [PATCH] Fix crash when a quest adds a new quest in its update() call --- source/game/StarQuestManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/game/StarQuestManager.cpp b/source/game/StarQuestManager.cpp index df8a19a..8b85355 100644 --- a/source/game/StarQuestManager.cpp +++ b/source/game/StarQuestManager.cpp @@ -408,9 +408,9 @@ void QuestManager::update(float dt) { } } - for (auto& q : m_quests) { - if (questValidOnServer(q.second)) - q.second->update(dt); + for (auto& q : m_quests.values()) { + if (questValidOnServer(q)) + q->update(dt); } }