Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Evoy2004-05-24 20:04:08 -0400
committerSean Evoy2004-05-24 20:04:08 -0400
commitcc0e391d69090a1231a7d692eacf62cdc63c093a (patch)
treec8f057d0b55b3826da50b2fcd87ef11a5f919182 /build/org.eclipse.cdt.managedbuilder.core
parentd03b0f48a0f0fcb86fb3f7a25f2f8f8ac67cbe54 (diff)
downloadorg.eclipse.cdt-cc0e391d69090a1231a7d692eacf62cdc63c093a.tar.gz
org.eclipse.cdt-cc0e391d69090a1231a7d692eacf62cdc63c093a.tar.xz
org.eclipse.cdt-cc0e391d69090a1231a7d692eacf62cdc63c093a.zip
Avoid an NPE on Gnu targets for POSIX systems that do not have an executable extension by default. NPE was happening when the tool ref for the linker tried to figure out what it's uninitialized output extension was. Duh
Diffstat (limited to 'build/org.eclipse.cdt.managedbuilder.core')
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
index 2838148b298..eda5eec5368 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
@@ -158,8 +158,8 @@ public class ToolReference implements IToolReference {
outputFlag = parent.getOutputFlag();
outputPrefix = parent.getOutputPrefix();
String[] extensions = parent.getOutputExtensions();
+ outputExtensions = new String();
if (extensions != null) {
- outputExtensions = new String();
for (int index = 0; index < extensions.length; ++index) {
if (extensions[index] == null) continue;
outputExtensions += extensions[index];
@@ -503,6 +503,7 @@ public class ToolReference implements IToolReference {
* @see org.eclipse.cdt.managedbuilder.core.ITool#getOutputExtensions()
*/
public String[] getOutputExtensions() {
+ if (outputExtensions == null) outputExtensions = new String();
return outputExtensions.split(DEFAULT_SEPARATOR);
}

Back to the top