DPA_SetPtr
Dimitrie O. Paun
dpaun at rogers.com
Sun Oct 20 10:51:21 CDT 2002
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;
More information about the wine-patches
mailing list