d3d9: Don't crash in GetFVF() if a NULL vertex declaration is set.
Henri Verbeet
hverbeet at codeweavers.com
Tue Dec 23 16:31:17 CST 2008
---
dlls/d3d9/device.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index 693b82f..d8c6e58 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;
--
1.5.6.4
--------------050603070500080301010809--
More information about the wine-patches
mailing list