1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-11 02:05:39 +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:
axel 2013-05-13 23:06:24 +02:00 committed by Sergey Prigogin
parent 385f1c6c9d
commit 7d596aa92f

View file

@ -83,8 +83,12 @@ public class ASTCommenter {
} }
private boolean isCommentOnSameLine(IASTNode node) { private boolean isCommentOnSameLine(IASTNode node) {
return commentNodeLocation.getStartingLineNumber() == if (node.getFileLocation() == null) {
node.getFileLocation().getEndingLineNumber(); return false;
} else {
return commentNodeLocation.getStartingLineNumber() == node.getFileLocation()
.getEndingLineNumber();
}
} }
@Override @Override