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:
parent
e30e3da19e
commit
50a30712fb
1 changed files with 7 additions and 5 deletions
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue