TAStudio/PatternsForm: Block deletion of loop entry which would cause a crash

This commit is contained in:
Daniel Parks 2023-04-26 21:41:10 -05:00 committed by James Groom
parent 07ba36956a
commit dd30a389a0
1 changed files with 4 additions and 0 deletions

View File

@ -88,6 +88,10 @@ namespace BizHawk.Client.EmuHawk
private void DeleteButton_Click(object sender, EventArgs e)
{
if (PatternList.SelectedIndex >= _counts.Count)
{
return;
}
_counts.RemoveAt(PatternList.SelectedIndex);
_values.RemoveAt(PatternList.SelectedIndex);
UpdatePattern();