From 20c60d1422f8ba42e8968e9b5b6a1cf2efd6d72e Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 13 Aug 2009 00:21:42 +0000 Subject: Fix serious bug in StaticResource::unloadId. svn-id: r43340 --- engines/kyra/staticres.cpp | 1 + 1 file changed, 1 insertion(+) 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; } -- cgit v1.2.3