瀏覽代碼

Fixed possible (?) crash in ResourceManager

DJWarmonger 7 年之前
父節點
當前提交
8ec762f858
共有 1 個文件被更改,包括 1 次插入1 次删除
  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