Fix crash if opening D3D11 cbuffer view with no shader bound

This commit is contained in:
baldurk
2024-09-24 14:14:13 +01:00
parent 11e8039622
commit f0389a6ccc
@@ -2277,9 +2277,12 @@ void D3D11PipelineStateViewer::cbuffer_itemActivated(RDTreeWidgetItem *item, int
uint32_t reg = tag.value<uint32_t>();
uint32_t index = ~0U;
for(uint32_t i = 0; i < stage->reflection->constantBlocks.size(); i++)
if(stage->reflection->constantBlocks[i].fixedBindNumber == reg)
index = i;
if(stage->reflection)
{
for(uint32_t i = 0; i < stage->reflection->constantBlocks.size(); i++)
if(stage->reflection->constantBlocks[i].fixedBindNumber == reg)
index = i;
}
if(index == ~0U)
{