diff options
author | Fate <fate-tmw@googlemail.com> | 2008-11-23 18:47:38 -0700 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2008-11-30 15:37:36 -0700 |
commit | 362271dae180acda703b84834006bbc46a21e02e (patch) | |
tree | d0945ab1e95553ffd50fb4be8d6bb964ae631d27 /src/resources/resourcemanager.cpp | |
parent | eac7d68a6b1a61528a8e2ef435f108a709618b88 (diff) | |
download | mana-362271dae180acda703b84834006bbc46a21e02e.tar.gz mana-362271dae180acda703b84834006bbc46a21e02e.tar.bz2 mana-362271dae180acda703b84834006bbc46a21e02e.tar.xz mana-362271dae180acda703b84834006bbc46a21e02e.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 310982af..510a16bd 100644 --- a/src/resources/resourcemanager.cpp +++ b/src/resources/resourcemanager.cpp @@ -128,10 +128,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 } } |