mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 01:07:22 +00:00
WINTERMUTE: Fix a memory-leak in the thumb-nail loading.
This commit is contained in:
parent
d6ec8c1947
commit
7bbd26c9a8
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user