Henri Verbeet : d3dx9: Don' t return a pointer to the implementation in ID3DXFontImpl_QueryInterface().
Alexandre Julliard
julliard at winehq.org
Wed Apr 11 12:56:46 CDT 2012
Module: wine
Branch: master
Commit: 74c2ddc908dd862800644463edaf0028e9425ba0
URL: http://source.winehq.org/git/wine.git/?a=commit;h=74c2ddc908dd862800644463edaf0028e9425ba0
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Tue Apr 10 22:06:22 2012 +0200
d3dx9: Don't return a pointer to the implementation in ID3DXFontImpl_QueryInterface().
---
dlls/d3dx9_36/font.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/dlls/d3dx9_36/font.c b/dlls/d3dx9_36/font.c
index a27f80a..1904c68 100644
--- a/dlls/d3dx9_36/font.c
+++ b/dlls/d3dx9_36/font.c
@@ -43,17 +43,21 @@ static inline ID3DXFontImpl *impl_from_ID3DXFont(ID3DXFont *iface)
return CONTAINING_RECORD(iface, ID3DXFontImpl, ID3DXFont_iface);
}
-static HRESULT WINAPI ID3DXFontImpl_QueryInterface(ID3DXFont *iface, REFIID riid, void **object)
+static HRESULT WINAPI ID3DXFontImpl_QueryInterface(ID3DXFont *iface, REFIID riid, void **out)
{
- ID3DXFontImpl *This=impl_from_ID3DXFont(iface);
+ TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
- TRACE("(%p): QueryInterface from %s\n", This, debugstr_guid(riid));
- if(IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_ID3DXFont)) {
+ if (IsEqualGUID(riid, &IID_ID3DXFont)
+ || IsEqualGUID(riid, &IID_IUnknown))
+ {
IUnknown_AddRef(iface);
- *object=This;
+ *out = iface;
return S_OK;
}
- WARN("(%p)->(%s, %p): not found\n", iface, debugstr_guid(riid), *object);
+
+ WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
+
+ *out = NULL;
return E_NOINTERFACE;
}
More information about the wine-cvs
mailing list