X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cb0afb266214f827417c42474168c7edda7c953e..55945915c940d1708d296e69bb195f9388af8203:/src/msw/listbox.cpp 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() )