aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);