From ab1243277ab18ce54720dc734c48520f01274ad9 Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Wed, 20 Sep 2017 19:14:12 +0200 Subject: DM: Fix leaking the save thumbnail MemoryWriteStreamDynamic buffer --- engines/dm/eventman.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/dm') 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); } -- cgit v1.2.3