1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 17:56:01 +02:00

bug 328780: NPE when compiler options are displayed

This commit is contained in:
Andrew Gvozdev 2010-10-27 02:20:41 +00:00
parent a2ee72d9c5
commit 8bb961660c

View file

@ -77,16 +77,18 @@ public class ManagedCommandLineGenerator implements
outputName = DOUBLE_QUOTE + outputName + DOUBLE_QUOTE; outputName = DOUBLE_QUOTE + outputName + DOUBLE_QUOTE;
String inputsStr=""; //$NON-NLS-1$ String inputsStr=""; //$NON-NLS-1$
for (String inp : inputResources) { if (inputResources!=null) {
if(inp!=null && inp.length()>0) { for (String inp : inputResources) {
// if the input resource isn't a variable then quote it if(inp!=null && inp.length()>0) {
if(inp.indexOf("$(") != 0) { //$NON-NLS-1$ // if the input resource isn't a variable then quote it
inp = DOUBLE_QUOTE + inp + DOUBLE_QUOTE; if(inp.indexOf("$(") != 0) { //$NON-NLS-1$
inp = DOUBLE_QUOTE + inp + DOUBLE_QUOTE;
}
inputsStr = inputsStr + inp + WHITESPACE;
} }
inputsStr = inputsStr + inp + WHITESPACE;
} }
inputsStr = inputsStr.trim();
} }
inputsStr = inputsStr.trim();
String flagsStr = stringArrayToString(flags); String flagsStr = stringArrayToString(flags);