Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/cross
diff options
context:
space:
mode:
authorMarc-Andre Laperle2015-06-02 05:22:24 +0000
committerMarc-Andre Laperle2015-06-02 05:22:24 +0000
commit30447e7806d90bb35b9539b47feed181ffbe254a (patch)
treeb97e7eb508294c3be72d8c120947fa8a2803a2d1 /cross
parenta7d3f1d3b57be87a355b11aa5bf2af5e2b4506e2 (diff)
downloadorg.eclipse.cdt-30447e7806d90bb35b9539b47feed181ffbe254a.tar.gz
org.eclipse.cdt-30447e7806d90bb35b9539b47feed181ffbe254a.tar.xz
org.eclipse.cdt-30447e7806d90bb35b9539b47feed181ffbe254a.zip
Bug 469066 - NPE in CrossGCCBuiltinSpecsDetector.getCompilerCommand
Change-Id: Ie79a6043c742d9cd42bb846e5736676d9d0cbd6c Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Diffstat (limited to 'cross')
-rw-r--r--cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/CrossGCCBuiltinSpecsDetector.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/CrossGCCBuiltinSpecsDetector.java b/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/CrossGCCBuiltinSpecsDetector.java
index fc26b62374f..88c3616da92 100644
--- a/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/CrossGCCBuiltinSpecsDetector.java
+++ b/cross/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/CrossGCCBuiltinSpecsDetector.java
@@ -23,14 +23,16 @@ public class CrossGCCBuiltinSpecsDetector extends GCCBuiltinSpecsDetector {
protected String getCompilerCommand(String languageId) {
// Include the cross command prefix (tool option) in the ${COMMAND} macro
// For example: "arch-os-" + "gcc"
- String prefix = "";
+ String prefix = ""; //$NON-NLS-1$
IToolChain toolchain = null;
if (currentCfgDescription != null) {
IConfiguration cfg = ManagedBuildManager.getConfigurationForDescription(currentCfgDescription);
toolchain = cfg != null ? cfg.getToolChain() : null;
if (toolchain != null) {
IOption option = toolchain.getOptionBySuperClassId("cdt.managedbuild.option.gnu.cross.prefix"); //$NON-NLS-1$
- prefix = (String)option.getValue();
+ if (option != null) {
+ prefix = (String) option.getValue();
+ }
}
}
return prefix + super.getCompilerCommand(languageId);

Back to the top