Listview updates (G1)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This one properly fixes the problem reported by Paul Rupe.
It is relative to G0, sent earlier on the list.

ChangeLog:
  Remove item from the list, if we fail to initialize it at insert time.

--- dlls/comctl32/listview.c.G0	Fri Sep 27 09:19:31 2002
+++ dlls/comctl32/listview.c	Fri Sep 27 09:44:13 2002
@@ -6619,7 +6619,11 @@
 			   hdpaSubItems );
     if (nItem == -1) goto fail;
    
-    if (!LISTVIEW_SetItemT(infoPtr, lpLVItem, isW)) goto fail;
+    if (!LISTVIEW_SetItemT(infoPtr, lpLVItem, isW))
+    {
+	DPA_DeletePtr(infoPtr->hdpaItems, nItem);
+	goto fail;
+    }
 
     /* if we're sorted, sort the list, and update the index */
     if (is_sorted)
@@ -6630,7 +6634,8 @@
 	{
 	    ERR("We can't find the item we just inserted, possible memory corruption.");
 	    /* we can't remove it from the list if we can't find it, so just fail */
-	    goto fail;
+	    /* we don't deallocate memory here, as it will probably cause more problems */
+	    return -1;
 	}
     }
 



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux