From 9e46d923d1a14cd64a7983c78b14aa9ad6acc240 Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 31 Oct 2017 15:05:32 +0000 Subject: [PATCH] Check for non-NULL resource desc when creating descriptor --- renderdoc/driver/d3d12/d3d12_manager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/renderdoc/driver/d3d12/d3d12_manager.cpp b/renderdoc/driver/d3d12/d3d12_manager.cpp index 1ff1e717f..9c4baf495 100644 --- a/renderdoc/driver/d3d12/d3d12_manager.cpp +++ b/renderdoc/driver/d3d12/d3d12_manager.cpp @@ -221,7 +221,7 @@ void D3D12Descriptor::Create(D3D12_DESCRIPTOR_HEAP_TYPE heapType, WrappedID3D12D // ensure that multi-plane formats have a valid plane slice specified. This shouldn't be // possible as it should be the application's responsibility to be valid too, but we fix it up // here anyway. - if(nonsamp.resource) + if(nonsamp.resource && desc) { D3D12_FEATURE_DATA_FORMAT_INFO formatInfo = {}; formatInfo.Format = desc->Format; @@ -323,7 +323,7 @@ void D3D12Descriptor::Create(D3D12_DESCRIPTOR_HEAP_TYPE heapType, WrappedID3D12D // ensure that multi-plane formats have a valid plane slice specified. This shouldn't be // possible as it should be the application's responsibility to be valid too, but we fix it up // here anyway. - if(nonsamp.resource) + if(nonsamp.resource && desc) { D3D12_FEATURE_DATA_FORMAT_INFO formatInfo = {}; formatInfo.Format = desc->Format; @@ -481,7 +481,7 @@ void D3D12Descriptor::Create(D3D12_DESCRIPTOR_HEAP_TYPE heapType, WrappedID3D12D // ensure that multi-plane formats have a valid plane slice specified. This shouldn't be // possible as it should be the application's responsibility to be valid too, but we fix it up // here anyway. - if(nonsamp.resource) + if(nonsamp.resource && desc) { D3D12_FEATURE_DATA_FORMAT_INFO formatInfo = {}; formatInfo.Format = desc->Format;