提交 fb83ad3e 编写于 作者: K kohsuke

NPE fix

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@18946 71c3de6d-444a-0410-be80-ed276b4c234a
上级 fafa4bec
......@@ -784,9 +784,11 @@ public abstract class Launcher {
private static EnvVars inherit(String[] env) {
// convert String[] to Map first
EnvVars m = new EnvVars();
for (String e : env) {
int index = e.indexOf('=');
m.put(e.substring(0,index), e.substring(index+1));
if(env!=null) {
for (String e : env) {
int index = e.indexOf('=');
m.put(e.substring(0,index), e.substring(index+1));
}
}
// then do the inheritance
return inherit(m);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册