diff options
-rw-r--r-- | src/resources/resourcemanager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp index 073e41c4..90b29374 100644 --- a/src/resources/resourcemanager.cpp +++ b/src/resources/resourcemanager.cpp @@ -130,10 +130,10 @@ void ResourceManager::cleanOrphans() else { logger->log("ResourceManager::release(%s)", res->mIdPath.c_str()); - delete res; ResourceIterator toErase = iter; ++iter; mOrphanedResources.erase(toErase); + delete res; // delete only after removal from list, to avoid issues in recursion } } |