From c3bff7f25a24c549885b8e402fb499b0dd48b9cd Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Wed, 20 Sep 2017 19:18:44 +0200 Subject: SWORD1: Fix leaking the save thumbnail MemoryWriteStreamDynamic buffer --- engines/sword1/control.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/sword1/control.cpp') diff --git a/engines/sword1/control.cpp b/engines/sword1/control.cpp index fbc3f6af4a..0c53430ba3 100644 --- a/engines/sword1/control.cpp +++ b/engines/sword1/control.cpp @@ -303,7 +303,7 @@ static int volToBalance(int volL, int volR) { uint8 Control::runPanel() { // Make a thumbnail of the screen before displaying the menu in case we want to save // the game from the menu. - _tempThumbnail = new Common::MemoryWriteStreamDynamic; + _tempThumbnail = new Common::MemoryWriteStreamDynamic(DisposeAfterUse::YES); Graphics::saveThumbnail(*_tempThumbnail); _panelShown = true; -- cgit v1.2.3