From d8d89887d1c5356a2bfdd7cfe72ed439e8b624f8 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Wed, 4 Apr 2012 20:37:23 +0200 Subject: [PATCH] ddrawex: Don't return a pointer to the implementation in IDirectDrawFactoryImpl_QueryInterface(). --- dlls/ddrawex/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/ddrawex/main.c b/dlls/ddrawex/main.c index 46c5716a3d8..568a5c6e7d4 100644 --- a/dlls/ddrawex/main.c +++ b/dlls/ddrawex/main.c @@ -168,19 +168,19 @@ static inline IDirectDrawFactoryImpl *impl_from_IDirectDrawFactory(IDirectDrawFa static HRESULT WINAPI IDirectDrawFactoryImpl_QueryInterface(IDirectDrawFactory *iface, REFIID riid, void **obj) { - IDirectDrawFactoryImpl *This = impl_from_IDirectDrawFactory(iface); - - TRACE("(%p)->(%s,%p)\n", This, debugstr_guid(riid), obj); + TRACE("(%p)->(%s,%p)\n", iface, debugstr_guid(riid), obj); if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectDrawFactory)) { IDirectDrawFactory_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)); + + *obj = NULL; return E_NOINTERFACE; } -- 2.11.4.GIT