aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray2003-06-14 13:13:17 +0000
committerJonathan Gray2003-06-14 13:13:17 +0000
commit3fc2d76452a9a610862a4ea1f1893744e6362496 (patch)
treee7b67fb961be141444929823de786a2de6702da6
parentab40e0cfc90e4747760b4a11f7ae373770860e11 (diff)
downloadscummvm-rg350-3fc2d76452a9a610862a4ea1f1893744e6362496.tar.gz
scummvm-rg350-3fc2d76452a9a610862a4ea1f1893744e6362496.tar.bz2
scummvm-rg350-3fc2d76452a9a610862a4ea1f1893744e6362496.zip
another leak
svn-id: r8471
-rw-r--r--scumm/scummvm.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index 8b7c78da99..0e3e6d6244 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -1450,8 +1450,11 @@ void Scumm::initRoomSubBlocks() {
gdi._C64ObjectMode = true;
} else if (_features & GF_OLD_BUNDLE) {
_IM00_offs = READ_LE_UINT16(roomptr + 0x0A);
- if (_version == 2)
+ if (_version == 2) {
+ if (_roomStrips != NULL)
+ free(_roomStrips);
_roomStrips = gdi.generateStripTable(roomptr + _IM00_offs, _roomWidth, _roomHeight, _roomStrips);
+ }
} else if (_features & GF_SMALL_HEADER)
_IM00_offs = findResourceData(MKID('IM00'), roomptr) - roomptr;
else if (_version == 8) {
@@ -2144,6 +2147,9 @@ void Scumm::destroy() {
free(_classData);
free(_exe_name);
free(_game_name);
+
+ if (_version <= 2)
+ free(_roomStrips);
}
//