]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/lboxcmn.cpp
Rework the wxCusor ctor taking wx stock number to provide as many cursors as
[wxWidgets.git] / src / common / lboxcmn.cpp
index e1b84321368853f631895012bb4cc093f6bb7d06..218ba8a71adf0459c32c3aad7dcc955f01d43aac 100644 (file)
@@ -75,9 +75,9 @@ void wxListBoxBase::Set(int nItems, const wxString* items, void **clientData)
 
 bool wxListBoxBase::SetStringSelection(const wxString& s, bool select)
 {
-    int sel = FindString(s);
-    wxCHECK_MSG( sel != wxNOT_FOUND, false,
-                 wxT("invalid string in SetStringSelection") );
+    const int sel = FindString(s);
+    if ( sel == wxNOT_FOUND )
+        return false;
 
     SetSelection(sel, select);