From f5e9903860424a1dcccb6ddd4186f907c99aab45 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 27 Nov 2025 15:20:36 +0000 Subject: [PATCH] Don't return video interface if real interface is missing. Closes #3735 --- renderdoc/driver/d3d11/d3d11_video.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/renderdoc/driver/d3d11/d3d11_video.cpp b/renderdoc/driver/d3d11/d3d11_video.cpp index 171c11ec2..1ed044324 100644 --- a/renderdoc/driver/d3d11/d3d11_video.cpp +++ b/renderdoc/driver/d3d11/d3d11_video.cpp @@ -51,9 +51,17 @@ HRESULT STDMETHODCALLTYPE WrappedID3D11VideoDevice2::QueryInterface(REFIID riid, } else if(riid == __uuidof(ID3D11VideoDevice)) { - *ppvObject = (ID3D11VideoDevice *)this; - AddRef(); - return S_OK; + if(m_pReal) + { + *ppvObject = (ID3D11VideoDevice *)this; + AddRef(); + return S_OK; + } + else + { + *ppvObject = NULL; + return E_NOINTERFACE; + } } else if(riid == __uuidof(ID3D11VideoDevice1)) {