mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 14:55:41 +02:00
Check for NPE is launcher.execute fails
This commit is contained in:
parent
8b55c57001
commit
6db02395cd
1 changed files with 23 additions and 20 deletions
|
@ -147,6 +147,7 @@ public class CBuilder extends ACBuilder {
|
||||||
OutputStream stderr = epm.getOutputStream();
|
OutputStream stderr = epm.getOutputStream();
|
||||||
|
|
||||||
Process p = launcher.execute(makepath, userArgs, env, workingDirectory);
|
Process p = launcher.execute(makepath, userArgs, env, workingDirectory);
|
||||||
|
if (p != null) {
|
||||||
try {
|
try {
|
||||||
// Close the input of the Process explicitely.
|
// Close the input of the Process explicitely.
|
||||||
// We will never write to it.
|
// We will never write to it.
|
||||||
|
@ -163,12 +164,14 @@ public class CBuilder extends ACBuilder {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
currProject.refreshLocal(IResource.DEPTH_INFINITE, subMonitor);
|
currProject.refreshLocal(IResource.DEPTH_INFINITE, subMonitor);
|
||||||
}
|
} catch (CoreException e) {
|
||||||
catch (CoreException e) {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
subMonitor = new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN);
|
subMonitor = new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN);
|
||||||
subMonitor.subTask("Parsing");
|
subMonitor.subTask("Parsing");
|
||||||
|
} else {
|
||||||
|
errMsg = launcher.getErrorMessage();
|
||||||
|
}
|
||||||
|
|
||||||
if (errMsg != null) {
|
if (errMsg != null) {
|
||||||
String errorDesc = CCorePlugin.getFormattedString(BUILD_ERROR, makepath.toString());
|
String errorDesc = CCorePlugin.getFormattedString(BUILD_ERROR, makepath.toString());
|
||||||
|
|
Loading…
Add table
Reference in a new issue