Explorar o código

Fixed possible (?) crash in ResourceManager

DJWarmonger %!s(int64=7) %!d(string=hai) anos
pai
achega
8ec762f858
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      AI/VCAI/ResourceManager.cpp

+ 1 - 1
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