Skip to content

Commit

Permalink
Merge pull request #377 from maven-nar/feature/fix-NPE-res-build
Browse files Browse the repository at this point in the history
Fix NPE msvc .res build
  • Loading branch information
GregDomjan authored Jul 23, 2021
2 parents 48af679 + 1856ac3 commit 818e081
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/main/java/com/github/maven_nar/cpptasks/CCTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,11 @@ private BuildException runTargetPool(final CCTaskProgressMonitor monitor, BuildE
if (compileException == null && exception instanceof BuildException) {
compileException = (BuildException) exception;
} else {
log(cores[j].getName() + " " + exception + " ", Project.MSG_ERR);
log(cores[j].getName() + " " + exception + " ", Project.MSG_ERR);
final StackTraceElement[] stackTrace = exception.getStackTrace();
for (final StackTraceElement element : stackTrace) {
log(element.toString(),Project.MSG_DEBUG);
}
}
if (!this.relentless) {
cores[j] = null;
Expand Down
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 818e081

Please sign in to comment.