diff options
-rw-r--r-- | engines/sword25/gfx/screenshot.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/engines/sword25/gfx/screenshot.cpp b/engines/sword25/gfx/screenshot.cpp index c86a2fe1d5..0b496971fc 100644 --- a/engines/sword25/gfx/screenshot.cpp +++ b/engines/sword25/gfx/screenshot.cpp @@ -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(), |