]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/combobox.cpp
add wxMBConvStrictUTF8 class implementing just UTF-8 conversion, without support...
[wxWidgets.git] / src / univ / combobox.cpp
index b615a9b53727ae8294a715ce9df5615956e337b8..f347cfe1b97082e25b9b7ae5489365306bf2368d 100644 (file)
@@ -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