1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-09-07 10:33:26 +02:00

Fixed a potential NPE.

This commit is contained in:
Sergey Prigogin 2013-10-21 10:15:46 -07:00
parent dcffc2cabf
commit b2b2a109f5

View file

@ -1004,8 +1004,10 @@ public class IncludeOrganizer {
for (IASTName name : declarations) {
if (name instanceof IAdaptable) {
IIndexName indexName = (IIndexName) ((IAdaptable) name).getAdapter(IIndexName.class);
indexNames = Arrays.copyOf(indexNames, indexNames.length + 1);
indexNames[indexNames.length - 1] = indexName;
if (indexName != null) {
indexNames = Arrays.copyOf(indexNames, indexNames.length + 1);
indexNames[indexNames.length - 1] = indexName;
}
}
}
} else if (allowDeclarations || binding instanceof IFunction || binding instanceof IVariable) {