From d5ff070505b174f2703b4cbc799fcc8c6bc16c9a Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 21 Oct 2021 15:56:22 +0800 Subject: [PATCH] fix: fix crash when open add remote dialog --- src/Views/Popups/Remote.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Views/Popups/Remote.xaml.cs b/src/Views/Popups/Remote.xaml.cs index 3d48b5e0..deb09322 100644 --- a/src/Views/Popups/Remote.xaml.cs +++ b/src/Views/Popups/Remote.xaml.cs @@ -28,7 +28,7 @@ namespace SourceGit.Views.Popups { InitializeComponent(); ruleName.Repo = repo; - if (RemoteURL.StartsWith("git@")) { + if (!string.IsNullOrEmpty(RemoteURL) && RemoteURL.StartsWith("git@")) { txtSSHKey.Text = new Commands.Config(repo.Path).Get($"remote.{remote.Name}.sshkey"); } else { txtSSHKey.Text = "";