Skip to content

Commit

Permalink
Fix error when spamming delete undo and redo
Browse files Browse the repository at this point in the history
  • Loading branch information
DrSmugleaf committed Nov 2, 2023
1 parent 005a6d0 commit 4a9e626
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Editor/ViewModels/RsiItemViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,11 @@ public void DeleteSelectedStates()
TryDelete(state, out lastIndex);
}

if (lastIndex == -1)
{
return;
}

ReselectState(lastIndex);
}

Expand Down

0 comments on commit 4a9e626

Please sign in to comment.