mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-08 08:40:55 +00:00
Check that buffer exists before restoring it
This commit is contained in:
@@ -549,7 +549,11 @@ void Serialiser::Serialise(const char *name, D3D12_CONSTANT_BUFFER_VIEW_DESC &el
|
||||
|
||||
if(m_Mode == READING)
|
||||
{
|
||||
ID3D12Resource *res = rm->GetLiveAs<ID3D12Resource>(buffer);
|
||||
ID3D12Resource *res = NULL;
|
||||
|
||||
if(buffer != ResourceId() && rm->HasLiveResource(buffer))
|
||||
res = rm->GetLiveAs<ID3D12Resource>(buffer);
|
||||
|
||||
if(res)
|
||||
el.BufferLocation = res->GetGPUVirtualAddress() + offs;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user