diff --git a/src/main/java/com/github/maven_nar/cpptasks/compiler/CommandLineCompiler.java b/src/main/java/com/github/maven_nar/cpptasks/compiler/CommandLineCompiler.java index 0b17175ba..c1f4f506d 100644 --- a/src/main/java/com/github/maven_nar/cpptasks/compiler/CommandLineCompiler.java +++ b/src/main/java/com/github/maven_nar/cpptasks/compiler/CommandLineCompiler.java @@ -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); }