diff --git a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeSelectionDialog.java b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeSelectionDialog.java index d7ccf3308a5..038feeb7e5e 100644 --- a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeSelectionDialog.java +++ b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeSelectionDialog.java @@ -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(); }