summaryrefslogtreecommitdiff
path: root/src/resources
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
parentce6905ac29998890ed41dc3039bb548a440e2608 (diff)
downloadmv-aeef06d5d58dcc6f9339bf6ef5a87e06a4827b17.tar.gz
mv-aeef06d5d58dcc6f9339bf6ef5a87e06a4827b17.tar.bz2
mv-aeef06d5d58dcc6f9339bf6ef5a87e06a4827b17.tar.xz
mv-aeef06d5d58dcc6f9339bf6ef5a87e06a4827b17.zip
Fix some imageset memory leaks.
Diffstat (limited to 'src/resources')
-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;
+ }
}
}