diff --git a/vJoySerialFeeder/MainForm.cs b/vJoySerialFeeder/MainForm.cs index 0a3f4ef..de96c20 100644 --- a/vJoySerialFeeder/MainForm.cs +++ b/vJoySerialFeeder/MainForm.cs @@ -205,7 +205,8 @@ private void loadProfile(Configuration.Profile p) { if(!connected) { // load this stuff only if not connected - comboProtocol.SelectedIndex = Array.FindIndex(Protocols, (t) => t.Name.Equals(p.Protocol)); + var pi = Array.FindIndex(Protocols, (t) => t.Name.Equals(p.Protocol)); + comboProtocol.SelectedIndex = pi == -1 ? 0 : pi; comboPorts.SelectedItem = p.COMPort; if (comboPorts.SelectedItem == null && comboPorts.Items.Count > 0) comboPorts.SelectedIndex = 0;