aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2009-05-12 19:36:09 +0000
committerJohannes Schickel2009-05-12 19:36:09 +0000
commit68c7aa7ff1131fd1189705bdbbdbde778b809e11 (patch)
treefe2bc5b09b9ccc865a2a33868abfc228e3e1077e
parent9c18a12fa0d7aa02b98b733281ced47ea742fbb3 (diff)
downloadscummvm-rg350-68c7aa7ff1131fd1189705bdbbdbde778b809e11.tar.gz
scummvm-rg350-68c7aa7ff1131fd1189705bdbbdbde778b809e11.tar.bz2
scummvm-rg350-68c7aa7ff1131fd1189705bdbbdbde778b809e11.zip
Fix invalid pop up widget selection, when no "opl_driver" setting is present.
svn-id: r40506
-rw-r--r--gui/options.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/gui/options.cpp b/gui/options.cpp
index c152a3a266..da9a5cecf5 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -183,8 +183,10 @@ void OptionsDialog::open() {
_midiPopUp->setSelectedTag(id);
}
- if (_oplPopUp)
- _oplPopUp->setSelectedTag(OPL::Config::parse(ConfMan.get("opl_driver", _domain)));
+ if (_oplPopUp) {
+ OPL::Config::DriverId id = MAX<OPL::Config::DriverId>(OPL::Config::parse(ConfMan.get("opl_driver", _domain)), 0);
+ _oplPopUp->setSelectedTag(id);
+ }
if (_outputRatePopUp) {
_outputRatePopUp->setSelected(1);