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;
|
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)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue