fixed crash when changing profiles via context menu

This commit is contained in:
jays2kings 2014-04-29 20:58:18 -04:00
parent 794cefe2e6
commit 335a411230

View File

@ -445,6 +445,7 @@ namespace ScpServer
else else
{ {
for (int i = 0; i < tS.DropDownItems.Count; i++) for (int i = 0; i < tS.DropDownItems.Count; i++)
if (!(shortcuts[tdevice].DropDownItems[i] is ToolStripSeparator))
((ToolStripMenuItem)tS.DropDownItems[i]).Checked = false; ((ToolStripMenuItem)tS.DropDownItems[i]).Checked = false;
((ToolStripMenuItem)e.ClickedItem).Checked = true; ((ToolStripMenuItem)e.ClickedItem).Checked = true;
cbs[tdevice].SelectedIndex = tS.DropDownItems.IndexOf(e.ClickedItem); cbs[tdevice].SelectedIndex = tS.DropDownItems.IndexOf(e.ClickedItem);
@ -515,4 +516,3 @@ namespace ScpServer
} }
} }
} }