Skip to content

Commit

Permalink
Merge pull request #2941 from jcmoore3/JENKINS-45516
Browse files Browse the repository at this point in the history
[JENKINS-45516] Fix null pointer exception when checking for previous completed build
  • Loading branch information
oleg-nenashev committed Jul 22, 2017
2 parents c5f7d23 + 245ad0b commit e770488
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/model/AbstractBuild.java
Expand Up @@ -337,7 +337,7 @@ public Set<User> calculateCulprits() {
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()) {
Expand Down

0 comments on commit e770488

Please sign in to comment.