From 0fb3cb9314088f045e552fd8b93033af318b403a Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Tue, 23 Dec 2008 23:31:17 +0100 Subject: [PATCH] d3d9: Don't crash in GetFVF() if a NULL vertex declaration is set. --- 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 693b82f7d9e..d8c6e58ae7d 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -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;