]> git.saurik.com Git - wxWidgets.git/commitdiff
don't assert in SetStringSelection() if the item isn't found for consistency with...
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 4 Jul 2006 00:31:52 +0000 (00:31 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 4 Jul 2006 00:31:52 +0000 (00:31 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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);