1
0
Fork 0
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:
Sergey Prigogin 2013-05-21 15:54:52 -07:00
parent 99767b4630
commit 7a1fd480ce

View file

@ -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);
} }