Module: wine Branch: master Commit: 1fcce55894c6a79e2f85def1875784a4f4baa40a URL: http://source.winehq.org/git/wine.git/?a=commit;h=1fcce55894c6a79e2f85def187...
Author: Rico Schüller kgbricola@web.de Date: Fri Apr 1 15:00:11 2011 +0200
d3dx9: Add argument check to D3DXCreateBuffer().
---
dlls/d3dx9_36/core.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/dlls/d3dx9_36/core.c b/dlls/d3dx9_36/core.c index 06a8305..8947970 100644 --- a/dlls/d3dx9_36/core.c +++ b/dlls/d3dx9_36/core.c @@ -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) {