aboutsummaryrefslogtreecommitdiff
path: root/engines/dialogs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/dialogs.cpp')
-rw-r--r--engines/dialogs.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index 410b5e8d4d..4f9557306e 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -296,12 +296,6 @@ ConfigDialog::ConfigDialog(bool subtitleControls)
#ifdef SMALL_SCREEN_DEVICE
new GUI::ButtonWidget(this, "ScummConfig.Keys", "Keys", kKeysCmd, 'K');
-
- //
- // Create the sub dialog(s)
- //
-
- _keysDialog = new GUI::KeysDialog();
#endif
}
@@ -316,7 +310,13 @@ void ConfigDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data)
case kKeysCmd:
#ifdef SMALL_SCREEN_DEVICE
- _keysDialog->runModal();
+ //
+ // Create the sub dialog(s)
+ //
+ _keysDialog = new GUI::KeysDialog();
+ _keysDialog->runModal();
+ delete _keysDialog;
+ _keysDialog = NULL;
#endif
break;
default: