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:
parent
dcffc2cabf
commit
b2b2a109f5
1 changed files with 4 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue