DPA_SetPtr

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

 




ChangeLog
  Do not rely on HeapReAlloc to allocate a NULL pointer.

--- dlls/comctl32/comctl32undoc.c.A1	Sun Oct 20 11:35:40 2002
+++ dlls/comctl32/comctl32undoc.c	Sun Oct 20 11:49:30 2002
@@ -1923,8 +1923,11 @@
 		hdpa->nGrow * ((INT)(((i+1) - 1) / hdpa->nGrow) + 1);
 	    INT nSize = nNewItems * sizeof(LPVOID);
 
-	    lpTemp = (LPVOID*)HeapReAlloc (hdpa->hHeap, HEAP_ZERO_MEMORY,
-					   hdpa->ptrs, nSize);
+	    if (hdpa->ptrs)
+	        lpTemp = (LPVOID*)HeapReAlloc (hdpa->hHeap, HEAP_ZERO_MEMORY, hdpa->ptrs, nSize);
+	    else
+		lpTemp = (LPVOID*)HeapAlloc (hdpa->hHeap, HEAP_ZERO_MEMORY, nSize);
+	    
 	    if (!lpTemp)
 		return FALSE;
 



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

  Powered by Linux