mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Avoid NPEs when Collector is not defined.
This commit is contained in:
parent
80b354c6dd
commit
cb794af018
2 changed files with 4 additions and 1 deletions
|
@ -97,7 +97,7 @@ public class GCCSpecsConsoleParser implements IScannerInfoConsoleParser {
|
|||
Map scannerInfo = new HashMap();
|
||||
scannerInfo.put(ScannerInfoTypes.INCLUDE_PATHS, includes);
|
||||
scannerInfo.put(ScannerInfoTypes.SYMBOL_DEFINITIONS, symbols);
|
||||
fCollector.contributeToScannerConfig(fProject, scannerInfo);
|
||||
if (fCollector != null) fCollector.contributeToScannerConfig(fProject, scannerInfo);
|
||||
TraceUtil.outputTrace("Scanner info from \'specs\' file", //$NON-NLS-1$
|
||||
"Include paths", includes, new ArrayList(), "Defined symbols", symbols); //$NON-NLS-1$ //$NON-NLS-2$);
|
||||
}
|
||||
|
|
|
@ -63,6 +63,9 @@ public class GCCSpecsRunSIProvider extends DefaultRunSIProvider {
|
|||
* @see org.eclipse.cdt.make.internal.core.scannerconfig2.DefaultRunSIProvider#prepareArguments(boolean)
|
||||
*/
|
||||
protected String[] prepareArguments(boolean isDefaultCommand) {
|
||||
if (collector == null)
|
||||
return fCompileArguments;
|
||||
|
||||
List tso = collector.getCollectedScannerInfo(resource.getProject(), ScannerInfoTypes.TARGET_SPECIFIC_OPTION);
|
||||
if (tso == null || tso.size() == 0) {
|
||||
return fCompileArguments;
|
||||
|
|
Loading…
Add table
Reference in a new issue