From 8da2062a896230f3bd3c81b0afd0a76ed94eea90 Mon Sep 17 00:00:00 2001 From: Lars Viklund Date: Mon, 11 May 2015 22:56:30 +0200 Subject: [PATCH] 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. --- renderdoc/driver/d3d11/d3d11_device.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renderdoc/driver/d3d11/d3d11_device.cpp b/renderdoc/driver/d3d11/d3d11_device.cpp index 57a89fcfe..94a1550f7 100644 --- a/renderdoc/driver/d3d11/d3d11_device.cpp +++ b/renderdoc/driver/d3d11/d3d11_device.cpp @@ -674,7 +674,7 @@ HRESULT WrappedID3D11Device::QueryInterface(REFIID riid, void **ppvObject) else if(riid == IRenderDoc_uuid) { AddRef(); - *ppvObject = this; + *ppvObject = static_cast(this); return S_OK; } else