Skip to content

Commit f5e9903

Browse files
committed
Don't return video interface if real interface is missing. Closes #3735
1 parent c61e3f7 commit f5e9903

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

renderdoc/driver/d3d11/d3d11_video.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,17 @@ HRESULT STDMETHODCALLTYPE WrappedID3D11VideoDevice2::QueryInterface(REFIID riid,
5151
}
5252
else if(riid == __uuidof(ID3D11VideoDevice))
5353
{
54-
*ppvObject = (ID3D11VideoDevice *)this;
55-
AddRef();
56-
return S_OK;
54+
if(m_pReal)
55+
{
56+
*ppvObject = (ID3D11VideoDevice *)this;
57+
AddRef();
58+
return S_OK;
59+
}
60+
else
61+
{
62+
*ppvObject = NULL;
63+
return E_NOINTERFACE;
64+
}
5765
}
5866
else if(riid == __uuidof(ID3D11VideoDevice1))
5967
{

0 commit comments

Comments
 (0)