diff options
Diffstat (limited to 'src/resources/resourcemanager.cpp')
-rw-r--r-- | src/resources/resourcemanager.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp index 0cff31f0a..481f74d30 100644 --- a/src/resources/resourcemanager.cpp +++ b/src/resources/resourcemanager.cpp @@ -244,8 +244,8 @@ bool ResourceManager::cleanOrphans(const bool always) const ResourceIterator toErase = iter; ++iter; mOrphanedResources.erase(toErase); - delete res; // delete only after removal from list, - // to avoid issues in recursion + delete res; // delete only after removal from list, + // to avoid issues in recursion status = true; } } @@ -912,7 +912,8 @@ void ResourceManager::deleteInstance() { logger->log("clean orphans start"); instance->cleanProtected(); - while (instance->cleanOrphans(true)); + while (instance->cleanOrphans(true)) + continue; logger->log("clean orphans end"); ResourceIterator iter = instance->mResources.begin(); |