1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Fix for 205566, NPE when searching.

This commit is contained in:
Markus Schorn 2007-10-05 12:25:52 +00:00
parent 284d5d60f0
commit d4a03b962f

View file

@ -92,9 +92,11 @@ public class PDOMSearchResult extends AbstractTextSearchResult implements IEdito
} }
public boolean isShownInEditor(Match match, IEditorPart editor) { public boolean isShownInEditor(Match match, IEditorPart editor) {
IPath filename = new Path(getFileName(editor)); final String fileName= getFileName(editor);
if (filename != null && match instanceof PDOMSearchMatch) if (fileName != null && match instanceof PDOMSearchMatch) {
return filename.equals(IndexLocationFactory.getAbsolutePath(((PDOMSearchMatch)match).getLocation())); final IPath filePath= new Path(fileName);
return filePath.equals(IndexLocationFactory.getAbsolutePath(((PDOMSearchMatch)match).getLocation()));
}
return false; return false;
} }