From 3c359449ad865fbc81bb232c678bbbd84b171b92 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 10 Jun 2007 14:23:26 +0000 Subject: Oops, fix crash when opening globals options dialog svn-id: r27312 --- gui/launcher.cpp | 5 +++++ gui/options.cpp | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'gui') diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 9e6163ca72..39d0fe2560 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -302,6 +302,11 @@ void EditGameDialog::reflowLayout() { OptionsDialog::reflowLayout(); + // FIXME/HACK to workaround bug #1677997, part #2 + { + loadConfigToWidgets(); + } + int labelWidth = g_gui.evaluator()->getVar("gameOptionsLabelWidth"); if (_langPopUp) diff --git a/gui/options.cpp b/gui/options.cpp index 1ca6b266a6..9e461d1f9b 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -666,6 +666,15 @@ void OptionsDialog::reflowLayout() { GlobalOptionsDialog::GlobalOptionsDialog() : OptionsDialog(Common::ConfigManager::kApplicationDomain, "globaloptions") { + +#ifdef SMALL_SCREEN_DEVICE + _keysDialog = 0; +#endif + _savePath = 0; + _themePath = 0; + _extraPath = 0; + _curTheme = 0; + _autosavePeriodPopUp = 0; // FIXME: Disable the setupWidgets() call here for now. See reflowLayout() // for details. @@ -779,10 +788,14 @@ void GlobalOptionsDialog::reflowLayout() { _focusedWidget = 0; _dragWidget = 0; setupWidgets(); - loadConfigToWidgets(); } OptionsDialog::reflowLayout(); + + // FIXME/HACK to workaround bug #1677997, part #2 + { + loadConfigToWidgets(); + } } void GlobalOptionsDialog::loadConfigToWidgets() { -- cgit v1.2.3