mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-08 16:50:44 +00:00
Fix crash opening task shader context menu with no task shader
This commit is contained in:
@@ -2987,10 +2987,12 @@ void BufferViewer::fixedVars_contextMenu(const QPoint &pos)
|
||||
|
||||
// if we're already filtering to a task, don't offer to filter any more. However if we're
|
||||
// filtered to a mesh allow 'broadening' the filter back to the task
|
||||
filterTask.setEnabled(m_CurMeshFilter != MeshFilter::TaskGroup);
|
||||
// also don't allow filtering at all if there is no task shader bound
|
||||
filterTask.setEnabled(!config1.taskSizes.empty() && m_CurMeshFilter != MeshFilter::TaskGroup);
|
||||
|
||||
const BufferConfiguration &config1 = m_ModelOut1->getConfig();
|
||||
if(config1.taskSizes[idx].x * config1.taskSizes[idx].y * config1.taskSizes[idx].z == 0)
|
||||
if(config1.taskSizes.empty() ||
|
||||
config1.taskSizes[idx].x * config1.taskSizes[idx].y * config1.taskSizes[idx].z == 0)
|
||||
gotoMesh.setEnabled(false);
|
||||
|
||||
// if there's a filter don't enable goto mesh as normally we just scroll to the first mesh - it
|
||||
|
||||
Reference in New Issue
Block a user