From 8ec762f858a02cfe231b7dae8a42095f8dcd19c9 Mon Sep 17 00:00:00 2001 From: DJWarmonger Date: Wed, 8 Aug 2018 15:43:42 +0200 Subject: [PATCH] Fixed possible (?) crash in ResourceManager --- AI/VCAI/ResourceManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AI/VCAI/ResourceManager.cpp b/AI/VCAI/ResourceManager.cpp index 26564b81a..7d8347923 100644 --- a/AI/VCAI/ResourceManager.cpp +++ b/AI/VCAI/ResourceManager.cpp @@ -217,8 +217,8 @@ bool ResourceManager::notifyGoalCompleted(Goals::TSubgoal goal) }); if (it != queue.end()) //removed at least one { + logAi->debug("Removing goal %s from ResourceManager.", it->goal->name()); queue.erase(queue.s_handle_from_iterator(it)); - logAi->debug("Removed goal %s from ResourceManager.", it->goal->name()); removedGoal = true; } else //found nothing more to remove