X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2a673eb1c9942cbdda6486bda330aeef0d43321a..ce7208d49d5ce2ca1dc0b3b83f14f1d04f29c4bf:/src/common/lboxcmn.cpp?ds=sidebyside diff --git a/src/common/lboxcmn.cpp b/src/common/lboxcmn.cpp index e1b8432136..218ba8a71a 100644 --- a/src/common/lboxcmn.cpp +++ b/src/common/lboxcmn.cpp @@ -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);