From 2071026acd64c418d6535cfff5476e6e09e61f27 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Tue, 13 Mar 2012 20:31:36 +0100 Subject: [PATCH] ddraw: Don't return a pointer to the implementation in IDirectDrawClassFactoryImpl_QueryInterface(). --- dlls/ddraw/main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dlls/ddraw/main.c b/dlls/ddraw/main.c index c58ba441bc1..400bb30d52e 100644 --- a/dlls/ddraw/main.c +++ b/dlls/ddraw/main.c @@ -545,19 +545,18 @@ static inline IClassFactoryImpl *impl_from_IClassFactory(IClassFactory *iface) static HRESULT WINAPI IDirectDrawClassFactoryImpl_QueryInterface(IClassFactory *iface, REFIID riid, void **obj) { - IClassFactoryImpl *This = impl_from_IClassFactory(iface); - TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), obj); if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IClassFactory)) { IClassFactory_AddRef(iface); - *obj = This; + *obj = iface; return S_OK; } - WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),obj); + WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid)); + return E_NOINTERFACE; }