X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6756186271a8394db23bc817e1aa36c27c52076a..a90280fe1ac7b78563d44afffd1d3b0b521b5cd6:/src/msw/listctrl.cpp?ds=inline diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 9e23d1db3f..f05ea49fb8 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -1162,6 +1162,10 @@ bool wxListCtrl::GetSubItemRect(long item, long subItem, wxRect& rect, int code) (subItem >= 0 && subItem < GetColumnCount()), false, _T("invalid sub item index") ); + // use wxCHECK_MSG against "item" too, for coherency with the generic implementation: + wxCHECK_MSG( item >= 0 && item < GetItemCount(), false, + _T("invalid item in GetSubItemRect") ); + int codeWin; if ( code == wxLIST_RECT_BOUNDS ) codeWin = LVIR_BOUNDS;