Commit 0def1dd4 authored by Dimitrie O. Paun's avatar Dimitrie O. Paun Committed by Alexandre Julliard

Do not create a range list for an empty range.

parent 0613b721
......@@ -1013,7 +1013,7 @@ static BOOL iterator_visibleitems(ITERATOR* i, LISTVIEW_INFO *infoPtr, HDC hdc)
if (rgntype == NULLREGION) return iterator_empty(i);
if (!iterator_frameditems(i, infoPtr, &rcClip)) return FALSE;
if (rgntype == SIMPLEREGION) return TRUE;
/* first deal with the special item */
if (LISTVIEW_GetItemBox(infoPtr, i->nSpecial, &rcItem) && !RectVisible(hdc, &rcItem))
i->nSpecial = -1;
......@@ -1021,7 +1021,7 @@ static BOOL iterator_visibleitems(ITERATOR* i, LISTVIEW_INFO *infoPtr, HDC hdc)
/* if we can't deal with the region, we'll just go with the simple range */
if (!LISTVIEW_GetOrigin(infoPtr, &Origin)) return TRUE;
TRACE("building visible range:\n");
if (!i->ranges)
if (!i->ranges && i->range.lower < i->range.upper)
{
if (!(i->ranges = ranges_create(50))) return TRUE;
if (!ranges_add(i->ranges, i->range))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment