Cheat Window, Ram Watc, Lua Console - fix exception when clicking Move Up on the first item in the list.

This commit is contained in:
adelikat 2012-03-26 23:38:29 +00:00
parent 602ee06ffc
commit f145d8e655
3 changed files with 7 additions and 0 deletions

View File

@ -270,6 +270,8 @@ namespace BizHawk.MultiClient
private void MoveUp()
{
ListView.SelectedIndexCollection indexes = CheatListView.SelectedIndices;
if (indexes[0] == 0)
return;
Cheat temp = new Cheat();
if (indexes.Count == 0) return;
foreach (int index in indexes)

View File

@ -471,6 +471,9 @@ namespace BizHawk.MultiClient
private void MoveUp()
{
ListView.SelectedIndexCollection indexes = LuaListView.SelectedIndices;
if (indexes[0] == 0)
return;
LuaFile temp = new LuaFile(false);
if (indexes.Count == 0) return;
foreach (int index in indexes)

View File

@ -517,6 +517,8 @@ namespace BizHawk.MultiClient
if (WatchListView.SelectedIndices.Count == 0)
return;
ListView.SelectedIndexCollection indexes = WatchListView.SelectedIndices;
if (indexes[0] == 0)
return;
Watch temp = new Watch();
if (indexes.Count == 0) return;
foreach (int index in indexes)