Skip to content

Commit 5bbef39

Browse files
committed
fix: crashing when trying to open context menu of a commit that contains a invalid remote branch decorator (#2367)
Signed-off-by: leo <longshuang@msn.cn>
1 parent 2aaf697 commit 5bbef39

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/Views/Histories.axaml.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,6 +1488,9 @@ private void FillOtherLocalBranchMenu(ContextMenu menu, ViewModels.Repository re
14881488

14891489
private void FillRemoteBranchMenu(ContextMenu menu, ViewModels.Repository repo, Models.Branch branch, Models.Branch current, bool merged)
14901490
{
1491+
if (branch == null)
1492+
return;
1493+
14911494
var name = branch.FriendlyName;
14921495

14931496
var submenu = new MenuItem();

0 commit comments

Comments
 (0)