1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

bug 342609: NPE in ChangeBuildConfigActionBase

This commit is contained in:
Andrew Gvozdev 2011-04-12 16:45:19 +00:00
parent 69e391fbe1
commit ca1d3510c6

View file

@ -254,25 +254,27 @@ public class ChangeBuildConfigActionBase {
if (!badObject && !fProjects.isEmpty()) {
Iterator<IProject> iter = fProjects.iterator();
ICConfigurationDescription[] firstConfigs = getCfgs(iter.next());
for (ICConfigurationDescription firstConfig : firstConfigs) {
boolean common = true;
Iterator<IProject> iter2 = fProjects.iterator();
while (iter2.hasNext()) {
ICConfigurationDescription[] currentConfigs = getCfgs(iter2.next());
int j = 0;
for (; j < currentConfigs.length; j++) {
if (firstConfig.getName().equals(currentConfigs[j].getName()))
if (firstConfigs!=null) {
for (ICConfigurationDescription firstConfig : firstConfigs) {
boolean common = true;
Iterator<IProject> iter2 = fProjects.iterator();
while (iter2.hasNext()) {
ICConfigurationDescription[] currentConfigs = getCfgs(iter2.next());
int j = 0;
for (; j < currentConfigs.length; j++) {
if (firstConfig.getName().equals(currentConfigs[j].getName()))
break;
}
if (j == currentConfigs.length) {
common = false;
break;
}
}
if (j == currentConfigs.length) {
common = false;
if (common) {
enable = true;
break;
}
}
if (common) {
enable = true;
break;
}
}
}
action.setEnabled(enable);