diff --git a/core/src/main/java/hudson/model/Run.java b/core/src/main/java/hudson/model/Run.java index e30988f91df5..22bac37e1f41 100644 --- a/core/src/main/java/hudson/model/Run.java +++ b/core/src/main/java/hudson/model/Run.java @@ -954,7 +954,10 @@ protected void dropLinks() { */ public @Nonnull List getPreviousBuildsOverThreshold(int numberOfBuilds, @Nonnull Result threshold) { RunT r = getPreviousBuild(); - return r.getBuildsOverThreshold(numberOfBuilds, threshold); + if (r != null) { + return r.getBuildsOverThreshold(numberOfBuilds, threshold); + } + return new ArrayList<>(numberOfBuilds); } /**