aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2009-08-13 00:21:42 +0000
committerJohannes Schickel2009-08-13 00:21:42 +0000
commit20c60d1422f8ba42e8968e9b5b6a1cf2efd6d72e (patch)
tree56715032a852c41312261ed9950f310f0e574d89
parent7b6cd29087e930db3b64992a0c3a18f2446cb48b (diff)
downloadscummvm-rg350-20c60d1422f8ba42e8968e9b5b6a1cf2efd6d72e.tar.gz
scummvm-rg350-20c60d1422f8ba42e8968e9b5b6a1cf2efd6d72e.tar.bz2
scummvm-rg350-20c60d1422f8ba42e8968e9b5b6a1cf2efd6d72e.zip
Fix serious bug in StaticResource::unloadId.
svn-id: r43340
-rw-r--r--engines/kyra/staticres.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp
index e33d24bf59..866a39b921 100644
--- a/engines/kyra/staticres.cpp
+++ b/engines/kyra/staticres.cpp
@@ -589,6 +589,7 @@ void StaticResource::unloadId(int id) {
if (pos->id == id || id == -1) {
const FileType *filetype = getFiletype(pos->type);
(this->*(filetype->free))(pos->data, pos->size);
+ pos = _resList.erase(pos);
if (id != -1)
break;
}