diff options
author | Fate <fate-tmw@googlemail.com> | 2008-11-23 18:47:38 -0700 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-12-13 16:53:46 +0100 |
commit | a4e81905cb19ba65c45a91371651026b524b7f44 (patch) | |
tree | 82e981b414f94e1b9b44e29212934be68d1f8df3 /src/resources | |
parent | a4893e0df4ee18b7393c0075a508f78694494d7f (diff) | |
download | mana-client-a4e81905cb19ba65c45a91371651026b524b7f44.tar.gz mana-client-a4e81905cb19ba65c45a91371651026b524b7f44.tar.bz2 mana-client-a4e81905cb19ba65c45a91371651026b524b7f44.tar.xz mana-client-a4e81905cb19ba65c45a91371651026b524b7f44.zip |
Delete resources after removing from the orphan list, to avoid double frees during recursion
Diffstat (limited to 'src/resources')
-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 8ee64452..08a4eec9 100644 --- a/src/resources/resourcemanager.cpp +++ b/src/resources/resourcemanager.cpp @@ -126,10 +126,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 } } |