aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-12-13 23:27:38 +0100
committerEinar Johan Trøan Sømåen2012-12-13 23:27:38 +0100
commit7bbd26c9a85c797ac3d6bcced327b0301d84ca6f (patch)
tree71af1cf64d84cc9f576a092f663ce20af89f7a86 /engines/wintermute
parentd6ec8c194778bf2e06c2d84013435a4144fde6e8 (diff)
downloadscummvm-rg350-7bbd26c9a85c797ac3d6bcced327b0301d84ca6f.tar.gz
scummvm-rg350-7bbd26c9a85c797ac3d6bcced327b0301d84ca6f.tar.bz2
scummvm-rg350-7bbd26c9a85c797ac3d6bcced327b0301d84ca6f.zip
WINTERMUTE: Fix a memory-leak in the thumb-nail loading.
Diffstat (limited to 'engines/wintermute')
-rw-r--r--engines/wintermute/base/base_persistence_manager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/wintermute/base/base_persistence_manager.cpp b/engines/wintermute/base/base_persistence_manager.cpp
index 501b7f6739..bd53ed38e4 100644
--- a/engines/wintermute/base/base_persistence_manager.cpp
+++ b/engines/wintermute/base/base_persistence_manager.cpp
@@ -150,7 +150,7 @@ void BasePersistenceManager::getSaveStateDesc(int slot, SaveStateDescriptor &des
Common::MemoryReadStream thumbStream(_thumbnailData, _thumbnailDataSize);
Graphics::BitmapDecoder bmpDecoder;
if (bmpDecoder.loadStream(thumbStream)) {
- Graphics::Surface *surf = new Graphics::Surface;
+ Graphics::Surface *surf = NULL;
surf = bmpDecoder.getSurface()->convertTo(g_system->getOverlayFormat());
TransparentSurface *scaleableSurface = new TransparentSurface(*surf, false);
Graphics::Surface *scaled = scaleableSurface->scale(kThumbnailWidth, kThumbnailHeight2);