From 037393c28aad8b8d7d59994328ae7d3ec1f45ee7 Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Tue, 11 Feb 2014 18:17:19 +0100 Subject: [PATCH] groovy null-safe operation, I miss you. --- core/src/main/java/hudson/Functions.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/hudson/Functions.java b/core/src/main/java/hudson/Functions.java index 3736611bf8..3d62d67d28 100644 --- a/core/src/main/java/hudson/Functions.java +++ b/core/src/main/java/hudson/Functions.java @@ -1011,7 +1011,7 @@ public class Functions { if(ig== Jenkins.getInstance() || (view != null && ig == view.getOwnerItemGroup())) { assert i instanceof TopLevelItem; - if (view.contains((TopLevelItem)i)) { + if (view != null && view.contains((TopLevelItem)i)) { // if p and the current page belongs to the same view, then return a relative path return normalizeURI(ancestors.get(view)+'/'+url); } else { -- GitLab