mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-17 01:29:19 +00:00
Check next step is in bounds for states before checking conditions
This commit is contained in:
1 file changed
+2
-1
@@ -1462,7 +1462,8 @@ void ShaderViewer::runTo(int runToInstruction, bool forward, ShaderEvents condit
|
||||
if(runToInstruction >= 0 && m_Trace->states[step].nextInstruction == (uint32_t)runToInstruction)
|
||||
break;
|
||||
|
||||
if(!firstStep && (m_Trace->states[step + inc].flags & condition))
|
||||
if(!firstStep && (step + inc >= 0) && (step + inc < m_Trace->states.count()) &&
|
||||
(m_Trace->states[step + inc].flags & condition))
|
||||
break;
|
||||
|
||||
if(!firstStep && m_Breakpoints.contains((int)m_Trace->states[step].nextInstruction))
|
||||
|
||||
Reference in new issue
Block a user