Listview O4

Dimitrie O. Paun dpaun at rogers.com
Fri Oct 11 11:53:55 CDT 2002


ChangeLog
  Be real tough on internal programming errors.

--- dlls/comctl32/listview.c.O3	Fri Oct 11 09:56:05 2002
+++ dlls/comctl32/listview.c	Fri Oct 11 12:52:35 2002
@@ -1416,7 +1416,7 @@
     {
 	if (!(lpLVItem->mask & LVIF_STATE) || 
 	    !(lpLVItem->stateMask & LVIS_FOCUSED)) 
-	    return FALSE;
+	    goto fail;
 	if (lpLVItem->state & LVIS_FOCUSED)
 	    oversizedBox = doLabel = TRUE;
     }
@@ -1447,7 +1447,7 @@
 	else
 	{
 	    /* we need the ident in report mode, if we don't have it, we fail */
-	    if (uView == LVS_REPORT && !(lpLVItem->mask & LVIF_INDENT)) return FALSE;
+	    if (uView == LVS_REPORT && !(lpLVItem->mask & LVIF_INDENT)) goto fail;
 	    State.left = Box.left;
 	    if (uView == LVS_REPORT) State.left += infoPtr->iconSize.cx * lpLVItem->iIndent;
 	    State.top  = Box.top;
@@ -1509,7 +1509,7 @@
 	   goto calc_label;
 	}
 	/* we need the text in non owner draw mode */
-	if (!(lpLVItem->mask & LVIF_TEXT)) return FALSE;
+	if (!(lpLVItem->mask & LVIF_TEXT)) goto fail;
 	if (is_textT(lpLVItem->pszText, TRUE))
         {
     	    HFONT hFont = infoPtr->hFont ? infoPtr->hFont : infoPtr->hDefaultFont;
@@ -1594,6 +1594,11 @@
     TRACE("    - box=%s\n", debugrect(&Box));
 
     return TRUE;
+
+fail:
+    ERR("Incorrect item=%s; please report.\n", debuglvitem_t(lpLVItem, TRUE));
+    *((char *)0) = 0;   /* it's an internal function, should never happen */
+    return FALSE;
 }
 
 /***




More information about the wine-patches mailing list