summaryrefslogtreecommitdiff
path: root/src/resources/resourcemanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-05-26 19:15:48 +0300
committerAndrei Karas <akaras@inbox.ru>2011-05-26 19:15:48 +0300
commitaeef06d5d58dcc6f9339bf6ef5a87e06a4827b17 (patch)
tree463861d544a1b6bb4fbab4f5176fe812e6b58d97 /src/resources/resourcemanager.cpp
parentce6905ac29998890ed41dc3039bb548a440e2608 (diff)
downloadmanaverse-aeef06d5d58dcc6f9339bf6ef5a87e06a4827b17.tar.gz
manaverse-aeef06d5d58dcc6f9339bf6ef5a87e06a4827b17.tar.bz2
manaverse-aeef06d5d58dcc6f9339bf6ef5a87e06a4827b17.tar.xz
manaverse-aeef06d5d58dcc6f9339bf6ef5a87e06a4827b17.zip
Fix some imageset memory leaks.
Diffstat (limited to 'src/resources/resourcemanager.cpp')
-rw-r--r--src/resources/resourcemanager.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index 79231a744..5552b64b1 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -138,8 +138,16 @@ ResourceManager::~ResourceManager()
}
#endif
if (iter->second)
+ {
cleanUp(iter->second);
- ++iter;
+ ResourceIterator toErase = iter;
+ ++iter;
+ mResources.erase(toErase);
+ }
+ else
+ {
+ ++iter;
+ }
}
}