From 8efb8794e8883231e79a53db88267aae0591da22 Mon Sep 17 00:00:00 2001 From: Paul Vriens Date: Thu, 10 Feb 2005 20:25:20 +0000 Subject: [PATCH] Check that ppZStencilSurface is not null. --- dlls/d3d9/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index aed23e3f6e8..14bda72b370 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -359,7 +359,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_GetDepthStencilSurface(LPDIRECT3DDEVICE9 i IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; TRACE("(%p)->returning (%p) default is stencilbuffer=(%p)\n", This, This->stencilBufferTarget, This->depthStencilBuffer); *ppZStencilSurface = (LPDIRECT3DSURFACE9) This->stencilBufferTarget; - IDirect3DSurface9Impl_AddRef((LPDIRECT3DSURFACE9) *ppZStencilSurface); + if (NULL != *ppZStencilSurface) IDirect3DSurface9Impl_AddRef((LPDIRECT3DSURFACE9) *ppZStencilSurface); return D3D_OK; }