Henri Verbeet : ddrawex: Don' t return a pointer to the implementation in IDirectDrawClassFactoryImpl_QueryInterface ().
Alexandre Julliard
julliard at winehq.org
Thu Apr 5 12:31:45 CDT 2012
Module: wine
Branch: master
Commit: 13f483a2a24c95e21601c03ad05c8c0e4c482cdd
URL: http://source.winehq.org/git/wine.git/?a=commit;h=13f483a2a24c95e21601c03ad05c8c0e4c482cdd
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Wed Apr 4 20:37:24 2012 +0200
ddrawex: Don't return a pointer to the implementation in IDirectDrawClassFactoryImpl_QueryInterface().
---
dlls/ddrawex/main.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/ddrawex/main.c b/dlls/ddrawex/main.c
index 568a5c6..d1c0fda 100644
--- a/dlls/ddrawex/main.c
+++ b/dlls/ddrawex/main.c
@@ -58,19 +58,19 @@ 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("(%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_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));
+
+ *obj = NULL;
return E_NOINTERFACE;
}
More information about the wine-cvs
mailing list