X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/365271b573e3d0ab7512471358f98a589f18c104..e7e97a594def45262e1a46a4b4089d3d9305c311:/src/univ/combobox.cpp diff --git a/src/univ/combobox.cpp b/src/univ/combobox.cpp index b615a9b537..f347cfe1b9 100644 --- a/src/univ/combobox.cpp +++ b/src/univ/combobox.cpp @@ -390,7 +390,11 @@ void wxComboBox::SetSelection(int n) GetLBox()->SetSelection(n); - SetText(GetLBox()->GetString(n)); + wxString str; + if ( n != wxNOT_FOUND ) + str = GetLBox()->GetString(n); + + SetText(str); } int wxComboBox::GetSelection() const