d3dx8: Do not cast NULL.

This commit is contained in:
Michael Stefaniuc 2008-11-02 00:24:38 +01:00 committed by Alexandre Julliard
parent 42c733cd3b
commit c6a9182a83
1 changed files with 2 additions and 2 deletions

View File

@ -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;