From e3a5b0b62afa737eccce8fdebb696db243b49083 Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 25 May 2021 09:09:49 +0800 Subject: [PATCH] fix: fix crash when open context menu of commit without branches parsed --- src/Views/Widgets/Histories.xaml.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Views/Widgets/Histories.xaml.cs b/src/Views/Widgets/Histories.xaml.cs index aeaa7942..f937d320 100644 --- a/src/Views/Widgets/Histories.xaml.cs +++ b/src/Views/Widgets/Histories.xaml.cs @@ -255,6 +255,8 @@ namespace SourceGit.Views.Widgets { commitList.SelectedItem = commit; var current = repo.Branches.Find(x => x.IsCurrent); + if (current == null) return; + var merged = commit.IsMerged; var menu = new ContextMenu(); var tags = new List();