aboutsummaryrefslogtreecommitdiff
path: root/engines/mads
diff options
context:
space:
mode:
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();