aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-05-31 13:30:16 +0200
committerEugene Sandulenko2016-05-31 17:12:18 +0200
commitb53d8104b7b8db79fa91285838590bc0f41b5447 (patch)
tree0b6dc3725bcd7eb4ea1ce67d10de093187424a4f
parent29d6e9a754d74e7bb92a3e1424436ecac6794a47 (diff)
downloadscummvm-rg350-b53d8104b7b8db79fa91285838590bc0f41b5447.tar.gz
scummvm-rg350-b53d8104b7b8db79fa91285838590bc0f41b5447.tar.bz2
scummvm-rg350-b53d8104b7b8db79fa91285838590bc0f41b5447.zip
TOON: Plug memory leak
-rw-r--r--engines/toon/toon.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index 6f1bb74b88..137562a91d 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -935,10 +935,12 @@ bool ToonEngine::showOptions() {
_gameState->_inMenu = false;
_firstFrame = true;
_gameState->_currentScrollValue = oldScrollValue;
-
+
restorePalette();
dirtyAllScreen();
+ delete optionPicture;
+
return exitGame;
}