Evan Stade : gdiplus: Tidy up graphics constructor.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Jun 25 07:28:16 CDT 2007
Module: wine
Branch: master
Commit: 6490dadb2396b8b495e681b6bbfd2a22acac355b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6490dadb2396b8b495e681b6bbfd2a22acac355b
Author: Evan Stade <estade at gmail.com>
Date: Fri Jun 22 19:27:02 2007 -0700
gdiplus: Tidy up graphics constructor.
---
dlls/gdiplus/graphics.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index beba700..5ac16f7 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -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;
More information about the wine-cvs
mailing list