aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2010-06-28 23:41:43 +0000
committerJohannes Schickel2010-06-28 23:41:43 +0000
commit23fa2296c3a3bc009b21684538e73e0520096e68 (patch)
tree0174fef95eaa89c831255e7ec3fc8c3fa235054e
parent15f9f37d4d15e8c8972fa0ecdbbdaf138ea2a8da (diff)
downloadscummvm-rg350-23fa2296c3a3bc009b21684538e73e0520096e68.tar.gz
scummvm-rg350-23fa2296c3a3bc009b21684538e73e0520096e68.tar.bz2
scummvm-rg350-23fa2296c3a3bc009b21684538e73e0520096e68.zip
Fix regression from r50382, which triggered an assert when clicking "OK" in the GMM's options dialog.
The problem here is that our ConfigDialog uses "" as domain name, this will result in the assert in common/config-manager.cpp:323 getting triggered, when using ConfMan.removeKey. Since setting the domain to the game's domain does not seem save according to the FIXME in gui/dialogs.cpp about this domain hackery, I decided to adapt the OptionsDialog to only call ConfMan.removeKey for "music_driver" etc., when the music driver widgets are present. This is consistent with the over uses of removeKey in OptionsDialog::close too. svn-id: r50468
-rw-r--r--gui/options.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/gui/options.cpp b/gui/options.cpp
index 74eda9bdfc..5dba2bafd5 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -364,14 +364,16 @@ void OptionsDialog::close() {
}
// Audio options
- if (_enableAudioSettings) {
- saveMusicDeviceSetting(_midiPopUp, "music_driver", musicDeviceSkipSettingDefault);
- saveMusicDeviceSetting(_mt32DevicePopUp, "mt32_device", musicDeviceSkipSettingSpec);
- saveMusicDeviceSetting(_gmDevicePopUp, "gm_device", musicDeviceSkipSettingSpec);
- } else {
- ConfMan.removeKey("music_driver", _domain);
- ConfMan.removeKey("mt32_device", _domain);
- ConfMan.removeKey("gm_device", _domain);
+ if (_midiPopUp) {
+ if (_enableAudioSettings) {
+ saveMusicDeviceSetting(_midiPopUp, "music_driver", musicDeviceSkipSettingDefault);
+ saveMusicDeviceSetting(_mt32DevicePopUp, "mt32_device", musicDeviceSkipSettingSpec);
+ saveMusicDeviceSetting(_gmDevicePopUp, "gm_device", musicDeviceSkipSettingSpec);
+ } else {
+ ConfMan.removeKey("music_driver", _domain);
+ ConfMan.removeKey("mt32_device", _domain);
+ ConfMan.removeKey("gm_device", _domain);
+ }
}
if (_oplPopUp) {