Anonymous committed 734d458

Should check for null environment

Comments (0)

Files changed (1)


       * as the user typically won't use characters that aren't defined for his locale. But then again, they might..
     private Process createWinProcess(String[] cmdArray, Map<String, String> environment, File workingDir) throws IOException {
-        Map<String, String> newEnv = new HashMap<String, String>(environment);
+        Map<String, String> newEnv = environment != null ? new HashMap<String, String>(environment) : new HashMap<String, String>();
         int extraArgs = 4;
         String[] i18n = new String[cmdArray.length + extraArgs];
         i18n[0] = "cmd";