mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-21 21:26:12 +00:00
Fix crash if accessed resource is unbound
This commit is contained in:
@@ -3371,14 +3371,11 @@ RDTreeWidgetItem *ShaderViewer::makeAccessedResourceNode(const ShaderVariable &v
|
||||
}
|
||||
}
|
||||
|
||||
RDTreeWidgetItem *node = NULL;
|
||||
RDTreeWidgetItem *node = new RDTreeWidgetItem({v.name, typeName, ToQStr(resId)});
|
||||
if(resId != ResourceId())
|
||||
{
|
||||
node = new RDTreeWidgetItem({v.name, typeName, ToQStr(resId)});
|
||||
node->setTag(QVariant::fromValue(AccessedResourceTag(bp, v.type)));
|
||||
if(modified)
|
||||
node->setForegroundColor(QColor(Qt::red));
|
||||
}
|
||||
if(modified)
|
||||
node->setForegroundColor(QColor(Qt::red));
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user