]> git.saurik.com Git - wxWidgets.git/commitdiff
assert in GetNextItem() fixed (?)
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 26 Jan 2000 00:17:21 +0000 (00:17 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 26 Jan 2000 00:17:21 +0000 (00:17 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5662 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/listctrl.cpp

index b7c2132a757c779955291744068bc582240bc488..ac31cb7f6900f64b155c03971615948d29e1837e 100644 (file)
@@ -2336,7 +2336,8 @@ long wxListMainWindow::GetNextItem( long item,
                                     int state )
 {
     long ret = item;
-    wxCHECK_MSG( ret < GetItemCount(), -1, _T("invalid listctrl index") );
+    wxCHECK_MSG( (ret == -1) || ((int)ret < GetItemCount()), -1,
+                 _T("invalid listctrl index in GetNextItem()") );
 
     // notice that we start with the next item (or the first one if item == -1)
     // and this is intentional to allow writing a simple loop to iterate over