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,12 +636,14 @@ 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);
if (typeInfos != null) {
for (int i = 0; i < typeInfos.length; i++) { for (int i = 0; i < typeInfos.length; i++) {
Object typeInfo = typeInfos[i]; Object typeInfo = typeInfos[i];
if (typeInfo instanceof IndexTypeInfo) { if (typeInfo instanceof IndexTypeInfo) {
addFoldedElements((IndexTypeInfo) typeInfo, result); addFoldedElements((IndexTypeInfo) typeInfo, result);
} }
} }
}
return result.toArray(); return result.toArray();
} }