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:
parent
284d5d60f0
commit
d4a03b962f
1 changed files with 5 additions and 3 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue