Lua functions list - don't throw exceptiosn when filtering, don't know why it happens but this will squash it, and it isn't important enough to know why.

This commit is contained in:
adelikat 2014-06-01 15:44:40 +00:00
parent aa2ae170f3
commit 3f675b2053
1 changed files with 26 additions and 16 deletions

View File

@ -53,23 +53,33 @@ namespace BizHawk.Client.EmuHawk
{
text = string.Empty;
switch (column)
try
{
if (FilteredList.Any() && index < FilteredList.Count)
{
switch (column)
{
case 0:
text = FilteredList[index].ReturnType;
break;
case 1:
text = FilteredList[index].Library;
break;
case 2:
text = FilteredList[index].Name;
break;
case 3:
text = FilteredList[index].ParameterList;
break;
case 4:
text = FilteredList[index].Description;
break;
}
}
}
catch
{
case 0:
text = FilteredList[index].ReturnType;
break;
case 1:
text = FilteredList[index].Library;
break;
case 2:
text = FilteredList[index].Name;
break;
case 3:
text = FilteredList[index].ParameterList;
break;
case 4:
text = FilteredList[index].Description;
break;
/* Eat it*/
}
}