diff options
-rw-r--r-- | engines/kyra/staticres.cpp | 1 |
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; } |