From e9f2bab4927ba3fa146992b648c9716540365b10 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 26 Sep 2014 18:01:40 +0300 Subject: [PATCH] Fix the resource disassociation loop in ~ResourceManager --- source/resourcemanager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/resourcemanager.cpp b/source/resourcemanager.cpp index 3456ac88..cdd03226 100644 --- a/source/resourcemanager.cpp +++ b/source/resourcemanager.cpp @@ -23,8 +23,8 @@ ResourceManager::~ResourceManager() { thread.terminate(); - for(ResourceMap::iterator i=resources.begin(); i!=resources.end(); ++i) - i->second.resource->set_manager(0); + while(!resources.empty()) + resources.begin()->second.resource->set_manager(0); } void ResourceManager::set_loading_policy(LoadingPolicy p) -- 2.45.2