According to... http://msdn2.microsoft.com/en-us/library/aa366701.aspx
lpMem [in] ...If this pointer is NULL, the behavior is undefined.
I personally dislike undefined behaviour -- If it is defined to NOP in wine that is sufficent for me.
But I think/tought I had a crash there tho...
- Nick
From: Stefan Dösinger stefandoesinger@gmx.at To: wine-devel@winehq.org CC: Nick Burns adger44@hotmail.com Subject: Re: dlls/opengl32/wgl.c: minor dealloc fix Date: Mon, 1 Jan 2007 22:33:49 +0100
Am 01.01.2007 um 11:03 schrieb Nick Burns:
There can be a problem where the detach is hit before internal_gl_extensions is allocated and it tries to free NULL and dies...
This just checks for the allocation before freeing -- very minor
- Nick
HeapFree(GetProcessHeap(), 0, NULL) is supposed to be a nop, so the check is not needed.