From 57e06a6cadc3b7bbbf18d4590dbb77d62d2c5bcb Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Sun, 13 May 2012 00:58:11 +0000 Subject: [PATCH] Fix error when a dropdown in the preferences dialog has no values Originally committed to SVN as r6772. --- aegisub/src/preferences_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aegisub/src/preferences_base.cpp b/aegisub/src/preferences_base.cpp index cd978faa5..8c516b0be 100644 --- a/aegisub/src/preferences_base.cpp +++ b/aegisub/src/preferences_base.cpp @@ -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;