From 0a0e948b2809590e2475e2d64e58a6adab3c7536 Mon Sep 17 00:00:00 2001 From: "H. Verbeet" Date: Wed, 14 Dec 2005 11:29:05 +0100 Subject: [PATCH] d3d9: Check for a NULL shader in IDirect3DDevice9Impl_GetVertexShader before getting the parent. --- dlls/d3d9/vertexshader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/d3d9/vertexshader.c b/dlls/d3d9/vertexshader.c index e4f76b9a9db..034b0979697 100644 --- a/dlls/d3d9/vertexshader.c +++ b/dlls/d3d9/vertexshader.c @@ -148,7 +148,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShader(LPDIRECT3DDEVICE9 iface, IDi TRACE("(%p) : Relay device@%p\n", This, This->WineD3DDevice); hrc = IWineD3DDevice_GetVertexShader(This->WineD3DDevice, &pShader); - if(hrc == D3D_OK){ + if(hrc == D3D_OK && pShader != NULL){ hrc = IWineD3DVertexShader_GetParent(pShader, (IUnknown **)ppShader); IWineD3DVertexShader_Release(pShader); } else {