1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Bug 488612 - Fix a NPE in DoxygenSingleAutoEditStrategy

Change-Id: I79f91dfc97da1cf4429fdedf4bee457b8e7cb1b7
This commit is contained in:
Nathan Ridge 2016-03-24 19:14:40 -04:00 committed by Gerrit Code Review @ Eclipse.org
parent e41a1c30eb
commit f136f05560

View file

@ -120,7 +120,7 @@ public class DoxygenSingleAutoEditStrategy extends DoxygenMultilineAutoEditStrat
try {
StringBuilder content = getDeclarationLines(doc, offset);
boolean contentAlreadyThere = (firstLineContainsText && content.toString().contains(commentContentBehindCursor.trim()));
boolean contentAlreadyThere = (firstLineContainsText && content != null && content.toString().contains(commentContentBehindCursor.trim()));
if (content == null || content.toString().trim().length() == 0 || contentAlreadyThere)
{
buf.setLength(0);