From 7e79e73410dbee18da992525c8d456d2b62ac587 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 11 Dec 2003 07:40:44 +0000 Subject: [PATCH] Applied [ 821234 ] Fix: erroneous assertion failed wxListBox::SetSelection git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@24734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/listbox.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp index f242886521..a3bfc6c91b 100644 --- a/src/msw/listbox.cpp +++ b/src/msw/listbox.cpp @@ -369,7 +369,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() )