Commit 1fcce558 authored by Rico Schüller's avatar Rico Schüller Committed by Alexandre Julliard

d3dx9: Add argument check to D3DXCreateBuffer().

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