aboutsummaryrefslogtreecommitdiff
path: root/engines/lab
diff options
context:
space:
mode:
authorStrangerke2015-12-18 07:28:07 +0100
committerWillem Jan Palenstijn2015-12-23 21:34:09 +0100
commit691d9e7e2ed8c5b5df62268f232c417410111a0e (patch)
tree9f5d1a67bb40cecffc9e2dc9f1b1db692b46b6fb /engines/lab
parentc5528a631d63e47b830c89258507ebb681d5b261 (diff)
downloadscummvm-rg350-691d9e7e2ed8c5b5df62268f232c417410111a0e.tar.gz
scummvm-rg350-691d9e7e2ed8c5b5df62268f232c417410111a0e.tar.bz2
scummvm-rg350-691d9e7e2ed8c5b5df62268f232c417410111a0e.zip
LAB: Fix memory leaks in savegame code
Diffstat (limited to 'engines/lab')
-rw-r--r--engines/lab/savegame.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/lab/savegame.cpp b/engines/lab/savegame.cpp
index d08dcbc24d..9802fc548e 100644
--- a/engines/lab/savegame.cpp
+++ b/engines/lab/savegame.cpp
@@ -231,6 +231,7 @@ bool LabEngine::saveRestoreGame() {
isOK = saveGame(slot, desc);
}
+ delete dialog;
} else {
// Restore
GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false);
@@ -240,6 +241,7 @@ bool LabEngine::saveRestoreGame() {
if (isOK)
_music->resetMusic();
}
+ delete dialog;
}
_alternate = false;