Fix crash when structured exporting on D3D

This commit is contained in:
baldurk
2022-07-19 10:11:31 +01:00
parent fb91e7360a
commit 3b00cf247e
2 changed files with 4 additions and 2 deletions
@@ -99,7 +99,8 @@ D3D11ShaderCache::D3D11ShaderCache(WrappedID3D11Device *wrapper)
// if we're being self-captured, the 'real' device will respond to renderdoc's UUID. Enable debug
// shaders
IUnknown *dummy = NULL;
wrapper->GetReal()->QueryInterface(IRenderDoc_uuid, (void **)&dummy);
if(wrapper->GetReal())
wrapper->GetReal()->QueryInterface(IRenderDoc_uuid, (void **)&dummy);
if(dummy)
{
@@ -307,7 +307,8 @@ D3D12ShaderCache::D3D12ShaderCache(WrappedID3D12Device *device)
// if we're being self-captured, the 'real' device will respond to renderdoc's UUID. Enable debug
// shaders
IUnknown *dummy = NULL;
device->GetReal()->QueryInterface(IRenderDoc_uuid, (void **)&dummy);
if(device->GetReal())
device->GetReal()->QueryInterface(IRenderDoc_uuid, (void **)&dummy);
if(dummy)
{