Author: gbrunmar
Date: Wed Dec 19 23:06:34 2007
New Revision: 31333
URL:
http://svn.reactos.org/svn/reactos?rev=31333&view=rev
Log:
Changed last IDirect3D9->QueryInterface() according to hpoussin's feedback
Modified:
trunk/reactos/dll/directx/d3d9/d3d9_impl.c
Modified: trunk/reactos/dll/directx/d3d9/d3d9_impl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/d3d9/d3d9_impl…
==============================================================================
--- trunk/reactos/dll/directx/d3d9/d3d9_impl.c (original)
+++ trunk/reactos/dll/directx/d3d9/d3d9_impl.c Wed Dec 19 23:06:34 2007
@@ -14,13 +14,16 @@
/* IDirect3D9: IUnknown implementation */
static HRESULT WINAPI IDirect3D9Impl_QueryInterface(LPDIRECT3D9 iface, REFIID riid,
LPVOID* ppvObject)
{
+ LPDIRECTD3D9_INT This = (LPDIRECTD3D9_INT)iface;
+
if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirect3D9))
{
IDirect3D9Impl_AddRef(iface);
- *ppvObject = iface;
+ *ppvObject = &This->lpVtbl;
return S_OK;
}
+ *ppvObject = NULL;
return E_NOINTERFACE;
}