mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Bug 541118 - NPE in AbstractIndexerTask.getOffset
Change-Id: I7ce30369abfb31dbdcc87e4fe9d36ea35e48ad79
This commit is contained in:
parent
5b21097125
commit
636fe00de6
1 changed files with 4 additions and 1 deletions
|
@ -296,7 +296,10 @@ public abstract class AbstractIndexerTask extends PDOMWriter {
|
|||
|
||||
private static int getOffset(IIndexMacro[] macros, int m) throws CoreException {
|
||||
if (m < macros.length) {
|
||||
return macros[m].getFileLocation().getNodeOffset();
|
||||
IASTFileLocation fileLoc = macros[m].getFileLocation();
|
||||
if (fileLoc != null) {
|
||||
return fileLoc.getNodeOffset();
|
||||
}
|
||||
}
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue