mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Bug 412463 - Fix an NPE
Change-Id: Ib38ca0033ee8db1123f8d6a2be990d17dccb9f14 Signed-off-by: Nathan Ridge <zeratul976@hotmail.com> Reviewed-on: https://git.eclipse.org/r/14544 Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com> IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com> Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
This commit is contained in:
parent
4d15c91d96
commit
492f6a2b18
1 changed files with 1 additions and 1 deletions
|
@ -284,7 +284,7 @@ public class WritablePDOM extends PDOM implements IWritableIndexFragment {
|
|||
int bestScore = -1;
|
||||
for (IIndexFile file : files) {
|
||||
int score = file.getMacros().length * 2;
|
||||
if (TranslationUnit.isSourceFile(TranslationUnit.getParsedInContext(file), tu.getCProject().getProject()))
|
||||
if (tu != null && TranslationUnit.isSourceFile(TranslationUnit.getParsedInContext(file), tu.getCProject().getProject()))
|
||||
score++;
|
||||
if (score > bestScore) {
|
||||
bestScore = score;
|
||||
|
|
Loading…
Add table
Reference in a new issue