Add explicit cast when QI for IRenderDoc_uuid

When assigning to the void** output parameter in QueryInterface, ensure
that the pointer written into the output is a COM pointer by casting to
the correct branch of the multiple inheritance.

As commit 2558b2cde introducing this functionality claims to return an
IUnknown*, so does this commit.
This commit is contained in:
Lars Viklund
2015-05-11 23:23:44 +02:00
parent 7e66c2787c
commit 8da2062a89
+1 -1
View File
@@ -674,7 +674,7 @@ HRESULT WrappedID3D11Device::QueryInterface(REFIID riid, void **ppvObject)
else if(riid == IRenderDoc_uuid)
{
AddRef();
*ppvObject = this;
*ppvObject = static_cast<IUnknown*>(this);
return S_OK;
}
else