d3dx9: Add argument check to D3DXCreateBuffer().

This commit is contained in:
Rico Schüller 2011-04-01 15:00:11 +02:00 committed by Alexandre Julliard
parent 4d54360765
commit 1fcce55894
1 changed files with 6 additions and 0 deletions

View File

@ -137,6 +137,12 @@ HRESULT WINAPI D3DXCreateBuffer(DWORD size, LPD3DXBUFFER *buffer)
struct ID3DXBufferImpl *object;
HRESULT hr;
if (!buffer)
{
WARN("Invalid buffer specified.\n");
return D3DERR_INVALIDCALL;
}
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
if (!object)
{