Fix crash while showing config dialog.
If user manually deleted servers from gui-config.json
This commit is contained in:
@@ -151,7 +151,7 @@ namespace Shadowsocks.View
|
||||
_modifiedConfiguration = controller.GetConfigurationCopy();
|
||||
LoadConfiguration(_modifiedConfiguration);
|
||||
_lastSelectedIndex = _modifiedConfiguration.index;
|
||||
if (_lastSelectedIndex < 0)
|
||||
if (_lastSelectedIndex < 0 || _lastSelectedIndex >= ServersListBox.Items.Count)
|
||||
{
|
||||
_lastSelectedIndex = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user