Tastudio - branches - fix crash when dropping a branch onto an invalid area

This commit is contained in:
adelikat 2015-08-04 21:54:43 -04:00
parent 226fcbb829
commit 15303fd49f
1 changed files with 3 additions and 3 deletions

View File

@ -305,7 +305,7 @@ namespace BizHawk.Client.EmuHawk
private void BranchView_CellDropped(object sender, InputRoll.CellEventArgs e)
{
if (e.NewCell != null && e.NewCell.IsDataCell)
if (e.NewCell != null && e.NewCell.IsDataCell && e.OldCell.RowIndex.Value < Branches.Count)
{
var branch = Branches[e.OldCell.RowIndex.Value];
int originalIndex = Branches.IndexOf(branch);