From ca450e5f2a5da6375d12190123d1acd35580ac15 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 27 Nov 2015 08:30:52 +0200 Subject: [PATCH] Decrement size when removing a resource from the loading thread --- source/resourcemanager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/resourcemanager.cpp b/source/resourcemanager.cpp index 7d5d752b..bcc4839b 100644 --- a/source/resourcemanager.cpp +++ b/source/resourcemanager.cpp @@ -440,12 +440,18 @@ bool ResourceManager::LoadingThread::try_remove_resource(ManagedResource &r) { i = find(sync_queue.begin(), sync_queue.end(), &r); if(i!=sync_queue.end()) + { sync_queue.erase(i); + --size; + } } else if(i==async_queue.begin()) return false; else + { async_queue.erase(i); + --size; + } return true; } -- 2.45.2