1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-15 20:25:46 +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) { public Object[] getFoldedElements(int index) {
ArrayList result= new ArrayList(); ArrayList result= new ArrayList();
Object[] typeInfos= super.getFoldedElements(index); Object[] typeInfos= super.getFoldedElements(index);
for (int i = 0; i < typeInfos.length; i++) { if (typeInfos != null) {
Object typeInfo = typeInfos[i]; for (int i = 0; i < typeInfos.length; i++) {
if (typeInfo instanceof IndexTypeInfo) { Object typeInfo = typeInfos[i];
addFoldedElements((IndexTypeInfo) typeInfo, result); if (typeInfo instanceof IndexTypeInfo) {
} addFoldedElements((IndexTypeInfo) typeInfo, result);
}
}
} }
return result.toArray(); return result.toArray();
} }