X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2a673eb1c9942cbdda6486bda330aeef0d43321a..7419ba028c7e2d0e585a9b043af587d993da16a7:/src/common/lboxcmn.cpp 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);