aboutsummaryrefslogtreecommitdiff
path: root/engines/mads
diff options
context:
space:
mode:
authorFilippos Karapetis2015-04-09 14:08:48 +0300
committerFilippos Karapetis2015-04-09 14:08:48 +0300
commitec03857d7dd7614675b41cfc412be20b733b469a (patch)
treea377d5dace98ef8eeb9c8250eb10ae2af40e4a3f /engines/mads
parentec999f1cb74dff8c42c69898bb6cbc3823b169dd (diff)
downloadscummvm-rg350-ec03857d7dd7614675b41cfc412be20b733b469a.tar.gz
scummvm-rg350-ec03857d7dd7614675b41cfc412be20b733b469a.tar.bz2
scummvm-rg350-ec03857d7dd7614675b41cfc412be20b733b469a.zip
MADS: Fix a regression in V2 games
Diffstat (limited to 'engines/mads')
-rw-r--r--engines/mads/scene_data.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/engines/mads/scene_data.cpp b/engines/mads/scene_data.cpp
index e594406447..e48bcd8c6f 100644
--- a/engines/mads/scene_data.cpp
+++ b/engines/mads/scene_data.cpp
@@ -451,8 +451,6 @@ void SceneInfo::loadMadsV2Background(int sceneId, const Common::String &resName,
fab.decompress(compressedTileData, compressedTileDataSize, (byte*)newTile->getPixels(), tileWidth * tileHeight);
tileSet.push_back(TileSetList::value_type(newTile));
- newTile->free();
- delete newTile;
delete[] compressedTileData;
}
@@ -471,6 +469,7 @@ void SceneInfo::loadMadsV2Background(int sceneId, const Common::String &resName,
for (int i = 0; i < tileIndex; i++)
++tile;
((*tile).get())->copyTo(&bgSurface, Common::Point(x * tileWidth, y * tileHeight));
+ ((*tile).get())->free();
}
}
tileSet.clear();