diff options
author | Bastien Bouclet | 2017-11-11 13:23:26 +0100 |
---|---|---|
committer | Bastien Bouclet | 2017-11-11 13:26:22 +0100 |
commit | 08f9e05b15e34886ff37962dd73169c26033ffb7 (patch) | |
tree | e26dd8ddbbd917051a0967edcff51904cf3bd61f /engines/sword25 | |
parent | 1dbe3ad18ea235debd29192f79537264cd247bab (diff) | |
download | scummvm-rg350-08f9e05b15e34886ff37962dd73169c26033ffb7.tar.gz scummvm-rg350-08f9e05b15e34886ff37962dd73169c26033ffb7.tar.bz2 scummvm-rg350-08f9e05b15e34886ff37962dd73169c26033ffb7.zip |
SWORD25: Fix leaking the save thumbnail surface
Diffstat (limited to 'engines/sword25')
-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(), |