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:
parent
69e391fbe1
commit
ca1d3510c6
1 changed files with 16 additions and 14 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue