diff --git a/core/src/main/java/hudson/scm/SCMS.java b/core/src/main/java/hudson/scm/SCMS.java index 1f28e02094..ee4c3e31d4 100644 --- a/core/src/main/java/hudson/scm/SCMS.java +++ b/core/src/main/java/hudson/scm/SCMS.java @@ -28,7 +28,7 @@ public class SCMS { */ public static SCM parseSCM(StaplerRequest req) throws FormException { String scm = req.getParameter("scm"); - if(scm==null) return null; + if(scm==null) return new NullSCM(); int scmidx = Integer.parseInt(scm); SCMDescriptor d = SCMS.get(scmidx);