From 5562339681de3437898d301bdf484720fbb4c4ff Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Wed, 7 Sep 2016 13:17:19 +0200 Subject: [PATCH] d3d9: Avoid a cast from a COM object to an interface. Signed-off-by: Michael Stefaniuc Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- 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 8f5f1437cab..5772c111b53 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; }