1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fixed possible (?) crash in ResourceManager

This commit is contained in:
DJWarmonger 2018-08-08 15:43:42 +02:00
parent 4b602c42ff
commit 8ec762f858

View File

@ -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