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

Alexandre Julliard julliard at winehq.org
Wed Dec 24 13:18:33 CST 2008


Module: wine
Branch: master
Commit: 0fb3cb9314088f045e552fd8b93033af318b403a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0fb3cb9314088f045e552fd8b93033af318b403a

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Tue Dec 23 23:31:17 2008 +0100

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

---

 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;




More information about the wine-cvs mailing list