d3d9: Avoid a cast from a COM object to an interface.

Michael Stefaniuc mstefani at redhat.de
Wed Sep 7 06:17:19 CDT 2016


Signed-off-by: Michael Stefaniuc <mstefani at redhat.de>
---
 dlls/d3d9/directx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/d3d9/directx.c b/dlls/d3d9/directx.c
index 8f5f143..5772c11 100644
--- a/dlls/d3d9/directx.c
+++ b/dlls/d3d9/directx.c
@@ -498,7 +498,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_CreateDevice(IDirect3D9Ex *iface, U
     }
 
     TRACE("Created device %p.\n", object);
-    *device = (IDirect3DDevice9 *)object;
+    *device = (IDirect3DDevice9 *)&object->IDirect3DDevice9Ex_iface;
 
     return D3D_OK;
 }
-- 
2.7.4



More information about the wine-patches mailing list