[GDI+: 3/10] graphics implementation
James Hawkins
truiken at gmail.com
Tue Jun 12 13:14:36 CDT 2007
On 6/12/07, Detlef Riekenberg <wine.dev at web.de> wrote:
> On Mo, 2007-06-11 at 11:54 -0700, Evan Stade wrote:
> > +GpStatus WINGDIPAPI GdipCreateFromHDC(HDC hdc, GpGraphics **graphics)
> > +{
> > + if(hdc == NULL)
> > + return OutOfMemory;
> > +
> > + if(graphics == NULL)
> > + return InvalidParameter;
> > +
> > + *graphics = (GpGraphics*) HeapAlloc(GetProcessHeap(),
> > HEAP_ZERO_MEMORY,
> > + sizeof(GpGraphics));
> > + (*graphics)->hdc = hdc;
> > + (*graphics)->hwnd = NULL;
>
> There is no need to set a member to NULL, when you use HEAP_ZERO_MEMORY.
>
The more important point is that we probably shouldn't be using
HEAP_ZERO_MEMORY here at all.
--
James Hawkins
More information about the wine-devel
mailing list