mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 01:15:29 +02:00
Bug 407506 - avoid NPE
Change-Id: Iddc1da83ee3bf1f74549d165d08056ddeef93a97 Reviewed-on: https://git.eclipse.org/r/12766 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
385f1c6c9d
commit
7d596aa92f
1 changed files with 6 additions and 2 deletions
|
@ -83,8 +83,12 @@ public class ASTCommenter {
|
|||
}
|
||||
|
||||
private boolean isCommentOnSameLine(IASTNode node) {
|
||||
return commentNodeLocation.getStartingLineNumber() ==
|
||||
node.getFileLocation().getEndingLineNumber();
|
||||
if (node.getFileLocation() == null) {
|
||||
return false;
|
||||
} else {
|
||||
return commentNodeLocation.getStartingLineNumber() == node.getFileLocation()
|
||||
.getEndingLineNumber();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue