aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorBastien Bouclet2017-09-20 19:14:12 +0200
committerBastien Bouclet2017-09-22 07:06:20 +0200
commitab1243277ab18ce54720dc734c48520f01274ad9 (patch)
tree745b9323891d8d165becc519dabe246438f71c72 /engines
parent2832332e74ecd0d166631dd516a98ffcde5b65b3 (diff)
downloadscummvm-rg350-ab1243277ab18ce54720dc734c48520f01274ad9.tar.gz
scummvm-rg350-ab1243277ab18ce54720dc734c48520f01274ad9.tar.bz2
scummvm-rg350-ab1243277ab18ce54720dc734c48520f01274ad9.zip
DM: Fix leaking the save thumbnail MemoryWriteStreamDynamic buffer
Diffstat (limited to 'engines')
-rw-r--r--engines/dm/eventman.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/dm/eventman.cpp b/engines/dm/eventman.cpp
index 622a7d5e1f..3859fc90b2 100644
--- a/engines/dm/eventman.cpp
+++ b/engines/dm/eventman.cpp
@@ -782,7 +782,7 @@ void EventManager::processCommandQueue() {
delete _vm->_saveThumbnail;
_vm->_saveThumbnail = nullptr;
} else if (!_vm->_saveThumbnail) {
- _vm->_saveThumbnail = new Common::MemoryWriteStreamDynamic();
+ _vm->_saveThumbnail = new Common::MemoryWriteStreamDynamic(DisposeAfterUse::YES);
Graphics::saveThumbnail(*_vm->_saveThumbnail);
}