X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fresourcemanager.cpp;h=cdd032264345dae5d81d11bf17f10e3da9ed09d3;hb=5ae4b00;hp=3456ac887a58f2e77d8e67ca7cf328a6fec8b1be;hpb=3c09b67afba6d560eab5817016a98268e1544bc4;p=libs%2Fgl.git 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)