gdiplus: Tidy up graphics constructor.
This commit is contained in:
parent
02efd4bbf1
commit
6490dadb23
|
@ -116,8 +116,9 @@ GpStatus WINGDIPAPI GdipCreateFromHDC(HDC hdc, GpGraphics **graphics)
|
|||
if(graphics == NULL)
|
||||
return InvalidParameter;
|
||||
|
||||
*graphics = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
||||
sizeof(GpGraphics));
|
||||
*graphics = GdipAlloc(sizeof(GpGraphics));
|
||||
if(!*graphics) return OutOfMemory;
|
||||
|
||||
(*graphics)->hdc = hdc;
|
||||
(*graphics)->hwnd = NULL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue