aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gui/options.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/gui/options.cpp b/gui/options.cpp
index 8ddd263a46..d3bda228a7 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -409,14 +409,16 @@ void OptionsDialog::close() {
}
// MT-32 options
- if (_enableMT32Settings) {
- saveMusicDeviceSetting(_mt32DevicePopUp, "mt32_device");
- ConfMan.setBool("native_mt32", _mt32Checkbox->getState(), _domain);
- ConfMan.setBool("enable_gs", _enableGSCheckbox->getState(), _domain);
- } else {
- ConfMan.removeKey("mt32_device", _domain);
- ConfMan.removeKey("native_mt32", _domain);
- ConfMan.removeKey("enable_gs", _domain);
+ if (_mt32DevicePopUp) {
+ if (_enableMT32Settings) {
+ saveMusicDeviceSetting(_mt32DevicePopUp, "mt32_device");
+ ConfMan.setBool("native_mt32", _mt32Checkbox->getState(), _domain);
+ ConfMan.setBool("enable_gs", _enableGSCheckbox->getState(), _domain);
+ } else {
+ ConfMan.removeKey("mt32_device", _domain);
+ ConfMan.removeKey("native_mt32", _domain);
+ ConfMan.removeKey("enable_gs", _domain);
+ }
}
// Subtitle options