1
0
Fork 0
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:
Markus Schorn 2008-12-18 09:43:13 +00:00
parent cc2e7e1da5
commit 2adb6f5d2b

View file

@ -24,6 +24,7 @@ import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
/**
@ -71,7 +72,11 @@ public class ProjectIndexerIncludeResolutionHeuristics implements IIncludeFileRe
if (files.length == 0)
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();
}