Skip to content

Commit

Permalink
Update MenuViewController.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
lrxtom2 committed Feb 24, 2020
1 parent b030ed5 commit 90ea15b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shadowsocks-csharp/View/MenuViewController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ private void Import_Click(object sender, EventArgs e)
{
string name = dlg.FileName;
Configuration cfg = Configuration.LoadFile(name);
if (cfg.configs.Count == 1 && cfg.configs[0].server == Configuration.GetDefaultServer().server)
if (cfg is null || (cfg.configs.Count == 1 && cfg.configs[0].server == Configuration.GetDefaultServer().server))
{
MessageBox.Show("Load config file failed", "ShadowsocksR");
}
Expand Down

0 comments on commit 90ea15b

Please sign in to comment.