mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-23 15:06:32 +00:00
Don't crash if stepping back from last instruction
This commit is contained in:
@@ -1089,7 +1089,8 @@ bool ShaderViewer::stepBack()
|
||||
{
|
||||
const ShaderDebugState &oldstate = m_Trace->states[CurrentStep()];
|
||||
|
||||
LineColumnInfo oldLine = m_Trace->lineInfo[oldstate.nextInstruction];
|
||||
LineColumnInfo oldLine =
|
||||
m_Trace->lineInfo[qMax(m_Trace->lineInfo.size() - 1, (size_t)oldstate.nextInstruction)];
|
||||
|
||||
while(CurrentStep() < m_Trace->states.count())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user