Skip to content

Commit 1134ade

Browse files
committed
Merge pull request #827 from SzymonPobiega/patch-1
Fix NullReferenceException
2 parents 192f71e + 4c69aaa commit 1134ade

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/GitVersionCore/LibGitExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public static Commit FindCommitBranchWasBranchedFrom([NotNull] this Branch branc
113113
mergeBaseCommit = findMergeBase,
114114
branch = otherBranch
115115
};
116-
}).Where(b => b != null).OrderByDescending(b => b.mergeBaseCommit.Committer.When).ToList();
116+
}).Where(b => b != null && b.mergeBaseCommit != null).OrderByDescending(b => b.mergeBaseCommit.Committer.When).ToList();
117117

118118
var firstOrDefault = mergeBases.FirstOrDefault();
119119
if (firstOrDefault != null)
@@ -282,4 +282,4 @@ public static void DumpGraph(string workingDirectory, Action<string> writer = nu
282282
else Console.Write(output.ToString());
283283
}
284284
}
285-
}
285+
}

0 commit comments

Comments
 (0)