Commit c6a9182a authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

d3dx8: Do not cast NULL.

parent 42c733cd
......@@ -39,7 +39,7 @@ HRESULT WINAPI D3DXCreateBuffer(DWORD NumBytes, LPD3DXBUFFER* ppBuffer) {
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(ID3DXBufferImpl));
if (NULL == object) {
*ppBuffer = (LPD3DXBUFFER)NULL;
*ppBuffer = NULL;
return E_OUTOFMEMORY;
}
object->lpVtbl = &D3DXBuffer_Vtbl;
......@@ -48,7 +48,7 @@ HRESULT WINAPI D3DXCreateBuffer(DWORD NumBytes, LPD3DXBUFFER* ppBuffer) {
object->buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, NumBytes);
if (NULL == object->buffer) {
HeapFree(GetProcessHeap(), 0, object);
*ppBuffer = (LPD3DXBUFFER)NULL;
*ppBuffer = NULL;
return E_OUTOFMEMORY;
}
*ppBuffer = (LPD3DXBUFFER)object;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment