d3dx9: Add argument check to D3DXCreateBuffer().
This commit is contained in:
parent
4d54360765
commit
1fcce55894
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue