diff options
author | Fate <fate-tmw@googlemail.com> | 2008-11-23 18:47:38 -0700 |
---|---|---|
committer | Fate <fate-tmw@googlemail.com> | 2008-11-23 18:47:38 -0700 |
commit | b4b6187aaa21e702bac7c9562b449c5de50e5460 (patch) | |
tree | 26f6cff71e023607fc468314925701a5cc895ebe /src/resources/resourcemanager.cpp | |
parent | 90e6af7dfc4e88e5a2a0d4a7f9c26b158eb7820e (diff) | |
download | mana-b4b6187aaa21e702bac7c9562b449c5de50e5460.tar.gz mana-b4b6187aaa21e702bac7c9562b449c5de50e5460.tar.bz2 mana-b4b6187aaa21e702bac7c9562b449c5de50e5460.tar.xz mana-b4b6187aaa21e702bac7c9562b449c5de50e5460.zip |
Delete resources after removing from the orphan list, to avoid double frees during recursion
Diffstat (limited to 'src/resources/resourcemanager.cpp')
-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 } } |