]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/lboxcmn.cpp
add wxUSE_BASE64 checks around DoRead/WriteBinary() functions
[wxWidgets.git] / src / common / lboxcmn.cpp
index 02d5c94b8125d3cf1e94f4c0d7c5b5c36d754e18..218ba8a71adf0459c32c3aad7dcc955f01d43aac 100644 (file)
@@ -26,8 +26,9 @@
 
 #if wxUSE_LISTBOX
 
+#include "wx/listbox.h"
+
 #ifndef WX_PRECOMP
-    #include "wx/listbox.h"
     #include "wx/dynarray.h"
     #include "wx/arrstr.h"
 #endif
@@ -74,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);