Fixed out of range while checking the selected index

This commit is contained in:
Hannele Ruiz 2018-08-28 07:44:26 -03:00
parent 18335e06c3
commit 55764919db

View File

@ -1225,8 +1225,11 @@ namespace DS4Windows
private void lVMacros_MouseDoubleClick(object sender, MouseEventArgs e)
{
if (lVMacros.SelectedIndices[0] >= 0)
if (lVMacros.SelectedIndices.Count == 0)
{
return;
}
if (lVMacros.SelectedItems[0].ImageIndex == 2)
{
TextBox tb = new TextBox();
@ -1290,7 +1293,6 @@ namespace DS4Windows
tb1.Focus();
}
}
}
void tb_TextChanged(object sender, EventArgs e)
{