From f136f05560469fa325677313468f9035eaeae400 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Thu, 24 Mar 2016 19:14:40 -0400 Subject: [PATCH] Bug 488612 - Fix a NPE in DoxygenSingleAutoEditStrategy Change-Id: I79f91dfc97da1cf4429fdedf4bee457b8e7cb1b7 --- .../ui/text/doctools/doxygen/DoxygenSingleAutoEditStrategy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/doctools/doxygen/DoxygenSingleAutoEditStrategy.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/doctools/doxygen/DoxygenSingleAutoEditStrategy.java index a643f83a4ad..f5b814ec15e 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/doctools/doxygen/DoxygenSingleAutoEditStrategy.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/doctools/doxygen/DoxygenSingleAutoEditStrategy.java @@ -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);