mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 01:36:01 +02:00
Bug 422217 - NPE in IndexLocationFactory.getAbsolutePath
This commit is contained in:
parent
24922585f0
commit
4f485bfd58
1 changed files with 5 additions and 1 deletions
|
@ -72,6 +72,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateInstance;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameter;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameter;
|
||||||
import org.eclipse.cdt.core.index.IIndex;
|
import org.eclipse.cdt.core.index.IIndex;
|
||||||
import org.eclipse.cdt.core.index.IIndexFile;
|
import org.eclipse.cdt.core.index.IIndexFile;
|
||||||
|
import org.eclipse.cdt.core.index.IIndexFileLocation;
|
||||||
import org.eclipse.cdt.core.index.IIndexFileSet;
|
import org.eclipse.cdt.core.index.IIndexFileSet;
|
||||||
import org.eclipse.cdt.core.index.IIndexInclude;
|
import org.eclipse.cdt.core.index.IIndexInclude;
|
||||||
import org.eclipse.cdt.core.index.IIndexName;
|
import org.eclipse.cdt.core.index.IIndexName;
|
||||||
|
@ -796,7 +797,10 @@ public class IncludeOrganizer {
|
||||||
IIndexFile indexFile = request.getDeclaringFiles().keySet().iterator().next();
|
IIndexFile indexFile = request.getDeclaringFiles().keySet().iterator().next();
|
||||||
if (!includedByPartner.contains(indexFile)) {
|
if (!includedByPartner.contains(indexFile)) {
|
||||||
for (IIndexInclude include : indexFile.getIncludes()) {
|
for (IIndexInclude include : indexFile.getIncludes()) {
|
||||||
fContext.addHeaderAlreadyIncluded(getAbsolutePath(include.getIncludesLocation()));
|
IIndexFileLocation headerLocation = include.getIncludesLocation();
|
||||||
|
if (headerLocation != null) {
|
||||||
|
fContext.addHeaderAlreadyIncluded(getAbsolutePath(headerLocation));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
includedByPartner.add(indexFile);
|
includedByPartner.add(indexFile);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue