d3d9: Check for a NULL shader in IDirect3DDevice9Impl_GetVertexShader

before getting the parent.
This commit is contained in:
H. Verbeet 2005-12-14 11:29:05 +01:00 committed by Alexandre Julliard
parent b05340a523
commit 0a0e948b28
1 changed files with 1 additions and 1 deletions

View File

@ -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 {