1
0
Fork 0
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:
Markus Schorn 2007-06-15 11:14:51 +00:00
parent e30e3da19e
commit 50a30712fb

View file

@ -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();
}