Browse Source

fix ArgumentOutOfRangeException

tags/3.0
everyx 9 years ago
parent
commit
1e9f1f3764
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      shadowsocks-csharp/View/ConfigForm.cs

+ 4
- 1
shadowsocks-csharp/View/ConfigForm.cs View File

@@ -188,7 +188,10 @@ namespace Shadowsocks.View
ServersListBox.SelectedIndex = _lastSelectedIndex;
return;
}
ServersListBox.Items[_lastSelectedIndex] = _modifiedConfiguration.configs[_lastSelectedIndex].FriendlyName();
if (_lastSelectedIndex >= 0)
{
ServersListBox.Items[_lastSelectedIndex] = _modifiedConfiguration.configs[_lastSelectedIndex].FriendlyName();
}
UpdateMoveUpAndDownButton();
LoadSelectedServer();
_lastSelectedIndex = ServersListBox.SelectedIndex;


Loading…
Cancel
Save