Skip to content
Permalink
Browse files
[JENKINS-45516] Fix null pointer exception when checking for previous…
… completed build
  • Loading branch information
jcmoore3 committed Jul 13, 2017
1 parent 62eb3c5 commit 245ad0bdb17ebd33eca81c099e8a19a893c049e3
Showing with 1 addition and 1 deletion.
  1. +1 −1 core/src/main/java/hudson/model/AbstractBuild.java
@@ -337,7 +337,7 @@ public boolean shouldCalculateCulprits() {
AbstractBuild<P,R> p = getPreviousCompletedBuild();
if (upstreamCulprits) {
// If we have dependencies since the last successful build, add their authors to our list
if (p.getPreviousNotFailedBuild() != null) {
if (p != null && p.getPreviousNotFailedBuild() != null) {
Map<AbstractProject, AbstractBuild.DependencyChange> depmap =
p.getDependencyChanges(p.getPreviousSuccessfulBuild());
for (AbstractBuild.DependencyChange dep : depmap.values()) {

0 comments on commit 245ad0b

Please sign in to comment.