tastudio: clamp newCell for dragged branches.

this fixes another OOB crash.
This commit is contained in:
feos 2015-07-31 00:30:40 +03:00
parent 90cdbc1d1f
commit a8fc79910f
1 changed files with 3 additions and 0 deletions

View File

@ -346,6 +346,9 @@ namespace BizHawk.Client.EmuHawk
int originalIndex = Branches.IndexOf(branch);
int newIndex = e.NewCell.RowIndex.Value;
if (newIndex >= Branches.Count)
newIndex = Branches.Count - 1;
Branches.Remove(branch);
Branches.Insert(newIndex, branch);
}