mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-24 05:01:43 +00:00
SWORD25: Fix leaking the save thumbnail surface
This commit is contained in:
parent
1dbe3ad18e
commit
08f9e05b15
@ -115,6 +115,7 @@ Common::SeekableReadStream *Screenshot::createThumbnail(Graphics::Surface *data)
|
||||
// Create a PNG representation of the thumbnail data
|
||||
Common::MemoryWriteStreamDynamic stream(DisposeAfterUse::NO);
|
||||
saveToFile(&thumbnail, &stream);
|
||||
thumbnail.free();
|
||||
|
||||
// Output a MemoryReadStream that encompasses the written data
|
||||
Common::SeekableReadStream *result = new Common::MemoryReadStream(stream.getData(), stream.size(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user