From: Julian Smart Date: Thu, 11 Dec 2003 07:40:44 +0000 (+0000) Subject: Applied [ 821234 ] Fix: erroneous assertion failed wxListBox::SetSelection X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5955710c8bd346e8be675bd1dbbd427723a57920?ds=inline Applied [ 821234 ] Fix: erroneous assertion failed wxListBox::SetSelection git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp index b795ef947e..90cfac1779 100644 --- a/src/msw/listbox.cpp +++ b/src/msw/listbox.cpp @@ -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() )