X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2a673eb1c9942cbdda6486bda330aeef0d43321a..69659fd770f615210efac4b4fa741b3ad6223616:/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);