mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-15 04:05:38 +02:00
Fixes a NPE in the TypeSelectionDialog.
This commit is contained in:
parent
e30e3da19e
commit
50a30712fb
1 changed files with 7 additions and 5 deletions
|
@ -636,11 +636,13 @@ public class TypeSelectionDialog extends TwoPaneElementSelector {
|
|||
public Object[] getFoldedElements(int index) {
|
||||
ArrayList result= new ArrayList();
|
||||
Object[] typeInfos= super.getFoldedElements(index);
|
||||
for (int i = 0; i < typeInfos.length; i++) {
|
||||
Object typeInfo = typeInfos[i];
|
||||
if (typeInfo instanceof IndexTypeInfo) {
|
||||
addFoldedElements((IndexTypeInfo) typeInfo, result);
|
||||
}
|
||||
if (typeInfos != null) {
|
||||
for (int i = 0; i < typeInfos.length; i++) {
|
||||
Object typeInfo = typeInfos[i];
|
||||
if (typeInfo instanceof IndexTypeInfo) {
|
||||
addFoldedElements((IndexTypeInfo) typeInfo, result);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toArray();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue