Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NPE msvc .res build #377

Merged
merged 2 commits into from
Jul 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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