Skip to content
Permalink
Browse files
Merge pull request #2941 from jcmoore3/JENKINS-45516
[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 e77048893a7ce73b0a55cf444ff3a2a9ed272bfb
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 e770488

Please sign in to comment.