summaryrefslogtreecommitdiff
path: root/src/resources/resourcemanager.cpp
diff options
context:
space:
mode:
authorMaarten Vanraes <maarten.vanraes@gmail.com>2011-05-26 22:22:10 +0200
committerMaarten Vanraes <maarten.vanraes@gmail.com>2011-05-26 22:22:10 +0200
commit98b4c6c5b5eb7c60919108c130d534938aed853e (patch)
treee79828f1c10311314402544414a81d55f6177b9c /src/resources/resourcemanager.cpp
parent2115769d94e29479e404fdf08c553e755250dce1 (diff)
parentaeef06d5d58dcc6f9339bf6ef5a87e06a4827b17 (diff)
downloadplus-98b4c6c5b5eb7c60919108c130d534938aed853e.tar.gz
plus-98b4c6c5b5eb7c60919108c130d534938aed853e.tar.bz2
plus-98b4c6c5b5eb7c60919108c130d534938aed853e.tar.xz
plus-98b4c6c5b5eb7c60919108c130d534938aed853e.zip
Merge branch 'master' of git://gitorious.org/manaplus/manaplus
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;
+ }
}
}