diff --git a/tfs/src/main/java/hudson/plugins/tfs/TeamFoundationServerScm.java b/tfs/src/main/java/hudson/plugins/tfs/TeamFoundationServerScm.java index 86f684668..4600c7ad1 100644 --- a/tfs/src/main/java/hudson/plugins/tfs/TeamFoundationServerScm.java +++ b/tfs/src/main/java/hudson/plugins/tfs/TeamFoundationServerScm.java @@ -534,6 +534,10 @@ public void buildEnvVars(final AbstractBuild build, final Map build, final Map env) { + // catch null on pipeline fail + if(null == build) { + return; + } final TeamBuildDetailsAction buildDetailsAction = build.getAction(TeamBuildDetailsAction.class); if (buildDetailsAction != null) { //Add the TFS build variables as environment variables in the Jenkins environment