Nikolay Sivov : comctl32/listview: Skip earlier when creating iterator for empty lists.

Alexandre Julliard julliard at winehq.org
Mon Oct 15 16:15:27 CDT 2018


Module: wine
Branch: master
Commit: 39c9fe1d37e65b313c3dd5ad8a0d50e373ff17fb
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=39c9fe1d37e65b313c3dd5ad8a0d50e373ff17fb

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Mon Oct 15 12:39:00 2018 +0300

comctl32/listview: Skip earlier when creating iterator for empty lists.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/comctl32/listview.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 95d619a..6b32167 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -1351,11 +1351,14 @@ static inline BOOL iterator_rangesitems(ITERATOR* i, RANGES ranges)
 static BOOL iterator_frameditems_absolute(ITERATOR* i, const LISTVIEW_INFO* infoPtr, const RECT *frame)
 {
     RECT rcItem, rcTemp;
-    
+
+    TRACE("(frame=%s)\n", wine_dbgstr_rect(frame));
+
     /* in case we fail, we want to return an empty iterator */
     if (!iterator_empty(i)) return FALSE;
 
-    TRACE("(frame=%s)\n", wine_dbgstr_rect(frame));
+    if (infoPtr->nItemCount == 0)
+        return TRUE;
 
     if (infoPtr->uView == LV_VIEW_ICON || infoPtr->uView == LV_VIEW_SMALLICON)
     {




More information about the wine-cvs mailing list