d3d9: Don't crash in GetFVF() if a NULL vertex declaration is set.

This commit is contained in:
Henri Verbeet 2008-12-23 23:31:17 +01:00 committed by Alexandre Julliard
parent c069474e18
commit 0fb3cb9314
1 changed files with 1 additions and 1 deletions

View File

@ -1333,7 +1333,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetFVF(LPDIRECT3DDEVICE9EX iface, DWO
return hr;
}
*pFVF = ((IDirect3DVertexDeclaration9Impl *)decl)->convFVF;
*pFVF = decl ? ((IDirect3DVertexDeclaration9Impl *)decl)->convFVF : 0;
TRACE("Returning FVF %#x\n", *pFVF);
return hr;