Skip to content

Commit 9e46d92

Browse files
committed
Check for non-NULL resource desc when creating descriptor
1 parent 83431bc commit 9e46d92

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

renderdoc/driver/d3d12/d3d12_manager.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ void D3D12Descriptor::Create(D3D12_DESCRIPTOR_HEAP_TYPE heapType, WrappedID3D12D
221221
// ensure that multi-plane formats have a valid plane slice specified. This shouldn't be
222222
// possible as it should be the application's responsibility to be valid too, but we fix it up
223223
// here anyway.
224-
if(nonsamp.resource)
224+
if(nonsamp.resource && desc)
225225
{
226226
D3D12_FEATURE_DATA_FORMAT_INFO formatInfo = {};
227227
formatInfo.Format = desc->Format;
@@ -323,7 +323,7 @@ void D3D12Descriptor::Create(D3D12_DESCRIPTOR_HEAP_TYPE heapType, WrappedID3D12D
323323
// ensure that multi-plane formats have a valid plane slice specified. This shouldn't be
324324
// possible as it should be the application's responsibility to be valid too, but we fix it up
325325
// here anyway.
326-
if(nonsamp.resource)
326+
if(nonsamp.resource && desc)
327327
{
328328
D3D12_FEATURE_DATA_FORMAT_INFO formatInfo = {};
329329
formatInfo.Format = desc->Format;
@@ -481,7 +481,7 @@ void D3D12Descriptor::Create(D3D12_DESCRIPTOR_HEAP_TYPE heapType, WrappedID3D12D
481481
// ensure that multi-plane formats have a valid plane slice specified. This shouldn't be
482482
// possible as it should be the application's responsibility to be valid too, but we fix it up
483483
// here anyway.
484-
if(nonsamp.resource)
484+
if(nonsamp.resource && desc)
485485
{
486486
D3D12_FEATURE_DATA_FORMAT_INFO formatInfo = {};
487487
formatInfo.Format = desc->Format;

0 commit comments

Comments
 (0)