mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Bug 408635. Fixed NPE
This commit is contained in:
parent
99767b4630
commit
7a1fd480ce
1 changed files with 11 additions and 9 deletions
|
@ -169,6 +169,7 @@ public class InclusionContext {
|
||||||
for (IPath path : fHeadersToInclude) {
|
for (IPath path : fHeadersToInclude) {
|
||||||
if (!exportedHeaders.contains(path)) {
|
if (!exportedHeaders.contains(path)) {
|
||||||
IIndexFile file = filesByPath.get(path);
|
IIndexFile file = filesByPath.get(path);
|
||||||
|
if (file != null) { // file can be null if the header was not indexed.
|
||||||
ArrayDeque<IIndexFile> queue = new ArrayDeque<IIndexFile>();
|
ArrayDeque<IIndexFile> queue = new ArrayDeque<IIndexFile>();
|
||||||
queue.add(file);
|
queue.add(file);
|
||||||
while ((file = queue.pollFirst()) != null) {
|
while ((file = queue.pollFirst()) != null) {
|
||||||
|
@ -184,6 +185,7 @@ public class InclusionContext {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
fHeadersToInclude.removeAll(exportedHeaders);
|
fHeadersToInclude.removeAll(exportedHeaders);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue