mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 299358: Protect against NPE.
This commit is contained in:
parent
15a9ac904e
commit
d4aa4850c7
1 changed files with 5 additions and 3 deletions
|
@ -146,9 +146,11 @@ public class LineSearchElement extends PDOMSearchElement {
|
||||||
|
|
||||||
// read the content of file
|
// read the content of file
|
||||||
FileContent content = FileContent.create(fileLocation);
|
FileContent content = FileContent.create(fileLocation);
|
||||||
|
if (content != null) {
|
||||||
AbstractCharArray buf = ((InternalFileContent) content).getSource();
|
AbstractCharArray buf = ((InternalFileContent) content).getSource();
|
||||||
if (buf != null)
|
if (buf != null)
|
||||||
result = collectLineElements(buf, matches, fileLocation);
|
result = collectLineElements(buf, matches, fileLocation);
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue