diff options
author | Johannes Schickel | 2009-05-12 19:36:09 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-05-12 19:36:09 +0000 |
commit | 68c7aa7ff1131fd1189705bdbbdbde778b809e11 (patch) | |
tree | fe2bc5b09b9ccc865a2a33868abfc228e3e1077e | |
parent | 9c18a12fa0d7aa02b98b733281ced47ea742fbb3 (diff) | |
download | scummvm-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.cpp | 6 |
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); |