mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-26 02:15:31 +02:00
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
This commit is contained in:
parent
d03b0f48a0
commit
cc0e391d69
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue