Fix error when a dropdown in the preferences dialog has no values

Originally committed to SVN as r6772.
This commit is contained in:
Thomas Goyne 2012-05-13 00:58:11 +00:00
parent d04bc6d9b4
commit 57e06a6cad
1 changed files with 1 additions and 1 deletions

View File

@ -194,7 +194,7 @@ void OptionPage::OptionChoice(wxFlexGridSizer *flex, const wxString &name, const
wxString val(lagi_wxString(opt->GetString()));
if (cb->FindString(val) != wxNOT_FOUND)
cb->SetStringSelection(val);
else
else if (!choices.empty())
cb->SetSelection(0);
cb->Bind(wxEVT_COMMAND_COMBOBOX_SELECTED, StringUpdater(opt_name, parent));
break;