diff options
author | Einar Johan Trøan Sømåen | 2012-12-13 23:27:38 +0100 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-12-13 23:27:38 +0100 |
commit | 7bbd26c9a85c797ac3d6bcced327b0301d84ca6f (patch) | |
tree | 71af1cf64d84cc9f576a092f663ce20af89f7a86 /engines/wintermute | |
parent | d6ec8c194778bf2e06c2d84013435a4144fde6e8 (diff) | |
download | scummvm-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.cpp | 2 |
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); |