]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied [ 821234 ] Fix: erroneous assertion failed wxListBox::SetSelection
authorJulian Smart <julian@anthemion.co.uk>
Thu, 11 Dec 2003 07:40:44 +0000 (07:40 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 11 Dec 2003 07:40:44 +0000 (07:40 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/listbox.cpp

index b795ef947e47a893e391a632fef923019e4743f2..90cfac17792dd7f8e8982855ef1405f4e06fa97d 100644 (file)
@@ -400,7 +400,8 @@ void wxListBox::Free()
 
 void wxListBox::SetSelection(int N, bool select)
 {
-    wxCHECK_RET( N >= 0 && N < m_noItems,
+    wxCHECK_RET( N == wxNOT_FOUND || 
+                    (N >= 0 && N < m_noItems),
                  wxT("invalid index in wxListBox::SetSelection") );
 
     if ( HasMultipleSelection() )