Commit 4522b07c authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3dx9: Don't return a pointer to the implementation in ID3DXMatrixStackImpl_QueryInterface().

parent daedd007
...@@ -801,17 +801,21 @@ static inline ID3DXMatrixStackImpl *impl_from_ID3DXMatrixStack(ID3DXMatrixStack ...@@ -801,17 +801,21 @@ static inline ID3DXMatrixStackImpl *impl_from_ID3DXMatrixStack(ID3DXMatrixStack
return CONTAINING_RECORD(iface, ID3DXMatrixStackImpl, ID3DXMatrixStack_iface); return CONTAINING_RECORD(iface, ID3DXMatrixStackImpl, ID3DXMatrixStack_iface);
} }
static HRESULT WINAPI ID3DXMatrixStackImpl_QueryInterface(ID3DXMatrixStack *iface, REFIID riid, void **ppobj) static HRESULT WINAPI ID3DXMatrixStackImpl_QueryInterface(ID3DXMatrixStack *iface, REFIID riid, void **out)
{ {
ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_ID3DXMatrixStack))
if (IsEqualGUID(riid, &IID_ID3DXMatrixStack)
|| IsEqualGUID(riid, &IID_IUnknown))
{ {
ID3DXMatrixStack_AddRef(iface); ID3DXMatrixStack_AddRef(iface);
*ppobj = This; *out = iface;
return S_OK; return S_OK;
} }
*ppobj = NULL;
WARN("(%p)->(%s,%p), not found\n", This, debugstr_guid(riid), ppobj); WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
*out = NULL;
return E_NOINTERFACE; return E_NOINTERFACE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment