WINTERMUTE: Fix a memory-leak in the thumb-nail loading.

This commit is contained in:
Einar Johan Trøan Sømåen 2012-12-13 23:27:38 +01:00
parent d6ec8c1947
commit 7bbd26c9a8

View File

@ -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);