mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
NPE in heuristics for include file resolution, bug 259222.
This commit is contained in:
parent
cc2e7e1da5
commit
2adb6f5d2b
1 changed files with 6 additions and 1 deletions
|
@ -24,6 +24,7 @@ import org.eclipse.core.resources.IFile;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
import org.eclipse.core.runtime.IPath;
|
||||||
import org.eclipse.core.runtime.Path;
|
import org.eclipse.core.runtime.Path;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -71,7 +72,11 @@ public class ProjectIndexerIncludeResolutionHeuristics implements IIncludeFileRe
|
||||||
if (files.length == 0)
|
if (files.length == 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
return selectBest(files, ifl.getFullPath().toCharArray()).getLocation().toString();
|
final IPath bestLocation = selectBest(files, ifl.getFullPath().toCharArray()).getLocation();
|
||||||
|
if (bestLocation == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
return bestLocation.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue