]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/listbox.cpp
Reordered includes to have OS2EMX_PLAIN_CHAR defined prior to including os2.h
[wxWidgets.git] / 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() )