From 956689757d71e8190bd18d4ff8b0f40da7061fe3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 4 Jul 2006 00:31:52 +0000 Subject: [PATCH] don't assert in SetStringSelection() if the item isn't found for consistency with wxItemContainerImmutable git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/lboxcmn.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); -- 2.45.2