Skip to content

Commit 8293169

Browse files
authored
Fix: Fixed crash when Git branch tip is null (#12622)
1 parent 7b3ef16 commit 8293169

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Files.App/Helpers/GitHelpers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public static BranchItem[] GetBranchesNames(string? path)
8383
.Where(b => !b.IsRemote || b.RemoteName == "origin")
8484
.OrderByDescending(b => b.IsCurrentRepositoryHead)
8585
.ThenBy(b => b.IsRemote)
86-
.ThenByDescending(b => b.Tip.Committer.When)
86+
.ThenByDescending(b => b.Tip?.Committer.When)
8787
.Select(b => new BranchItem(b.FriendlyName, b.IsRemote, b.TrackingDetails.AheadBy, b.TrackingDetails.BehindBy))
8888
.ToArray();
8989
}

0 commit comments

Comments
 (0)