1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-06 17:26: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;
String inputsStr=""; //$NON-NLS-1$
for (String inp : inputResources) {
if(inp!=null && inp.length()>0) {
// if the input resource isn't a variable then quote it
if(inp.indexOf("$(") != 0) { //$NON-NLS-1$
inp = DOUBLE_QUOTE + inp + DOUBLE_QUOTE;
if (inputResources!=null) {
for (String inp : inputResources) {
if(inp!=null && inp.length()>0) {
// if the input resource isn't a variable then quote it
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);