comctl32/listview: Do not try to invalidate for invalid item indices.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
76f135e599
commit
74d24b2197
|
@ -1727,7 +1727,9 @@ static inline void LISTVIEW_InvalidateItem(const LISTVIEW_INFO *infoPtr, INT nIt
|
|||
{
|
||||
RECT rcBox;
|
||||
|
||||
if(!is_redrawing(infoPtr)) return;
|
||||
if (!is_redrawing(infoPtr) || nItem < 0 || nItem >= infoPtr->nItemCount)
|
||||
return;
|
||||
|
||||
LISTVIEW_GetItemBox(infoPtr, nItem, &rcBox);
|
||||
LISTVIEW_InvalidateRect(infoPtr, &rcBox);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue