mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 17:35:35 +02:00
bug 291690: DiscoveryTab.java isn't properly protected against internal array being null
Patch from Jeff Johnston
This commit is contained in:
parent
ebe2e13ea1
commit
9283fb4363
1 changed files with 14 additions and 10 deletions
|
@ -489,9 +489,11 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
|
|||
|
||||
private void handleDiscoveryProfileChanged() {
|
||||
int pos = profileComboBox.getSelectionIndex();
|
||||
for (int i = 0; i < realPages.length; i++)
|
||||
if (realPages[i] != null)
|
||||
realPages[i].setVisible(i == pos);
|
||||
if (realPages != null) {
|
||||
for (int i = 0; i < realPages.length; i++)
|
||||
if (realPages[i] != null)
|
||||
realPages[i].setVisible(i == pos);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -577,13 +579,15 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
|
|||
if (buildInfo == null)
|
||||
return;
|
||||
String savedId = buildInfo.getSelectedProfileId();
|
||||
for (int i = 0; i < realPages.length; i++) {
|
||||
if (realPages != null && realPages[i] != null) {
|
||||
String s = visibleProfilesList.get(i);
|
||||
buildInfo.setSelectedProfileId(s);
|
||||
realPages[i].performApply();
|
||||
realPages[i].setVisible(false);
|
||||
}
|
||||
if (realPages != null) {
|
||||
for (int i = 0; i < realPages.length; i++) {
|
||||
if (realPages[i] != null) {
|
||||
String s = visibleProfilesList.get(i);
|
||||
buildInfo.setSelectedProfileId(s);
|
||||
realPages[i].performApply();
|
||||
realPages[i].setVisible(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
buildInfo.setSelectedProfileId(savedId);
|
||||
handleDiscoveryProfileChanged();
|
||||
|
|
Loading…
Add table
Reference in a new issue