From 8fe7871b59037fff5a606522ce84cf5f54a7071b Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 15 Jun 2021 16:14:16 +0800 Subject: [PATCH] fix: fix crash when there's no local branches --- src/Views/Popups/Pull.xaml.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Views/Popups/Pull.xaml.cs b/src/Views/Popups/Pull.xaml.cs index a479b4b8..745a5ecf 100644 --- a/src/Views/Popups/Pull.xaml.cs +++ b/src/Views/Popups/Pull.xaml.cs @@ -18,6 +18,8 @@ namespace SourceGit.Views.Popups { InitializeComponent(); var current = repo.Branches.Find(x => x.IsCurrent); + if (current == null) return; + txtInto.Text = current.Name; if (prefered == null && !string.IsNullOrEmpty(current.Upstream)) {