mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-15 02:11:22 +00:00
Fix crash if accessed resource is unbound
This commit is contained in:
1 file changed
+3
-6
@@ -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