Skip to content

Commit

Permalink
Fix NPE for building resource
Browse files Browse the repository at this point in the history
dryRun command tracking not initialized
unclear on assumption of commands being initialized
  • Loading branch information
GregDomjan committed Jul 23, 2021
1 parent 9d0acfc commit 1856ac3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,8 @@ protected int getTotalArgumentLengthForInputFile(final File outputDir, final Str
* arguments without actually spawning the compiler
*/
protected int runCommand(final CCTask task, final File workingDir, final String[] cmdline) throws BuildException {
commands.add(cmdline);
if(commands!=null)
commands.add(cmdline);
if (dryRun) return 0;
return CUtil.runCommand(task, workingDir, cmdline, this.newEnvironment, this.env);
}
Expand Down

0 comments on commit 1856ac3

Please sign in to comment.