Skip to main content
summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAnton Leherbauer2010-10-22 08:25:56 +0000
committerAnton Leherbauer2010-10-22 08:25:56 +0000
commitb78e2ea29a8dd4692415fedc19d1727c351d4109 (patch)
tree288c163409ed8dffdce6f5e02ffb826859877365 /core
parenta76a17353cd91f34512753e062fa935b2d52f05b (diff)
downloadorg.eclipse.cdt-b78e2ea29a8dd4692415fedc19d1727c351d4109.tar.gz
org.eclipse.cdt-b78e2ea29a8dd4692415fedc19d1727c351d4109.tar.xz
org.eclipse.cdt-b78e2ea29a8dd4692415fedc19d1727c351d4109.zip
Bug 328068 - Creation of element failed error when creating new C++ class
Diffstat (limited to 'core')
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/codemanipulation/StubUtility.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/codemanipulation/StubUtility.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/codemanipulation/StubUtility.java
index f1d268d9372..5e8e0112ba6 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/codemanipulation/StubUtility.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/codemanipulation/StubUtility.java
@@ -187,7 +187,7 @@ public class StubUtility {
context.setVariable(CodeTemplateContextType.ENCLOSING_TYPE, typeName);
context.setVariable(CodeTemplateContextType.BODY_STATEMENT, bodyStatement != null ? bodyStatement : ""); //$NON-NLS-1$
String str= evaluateTemplate(context, template, new String[] { CodeTemplateContextType.BODY_STATEMENT });
- if (str == null && !Strings.containsOnlyWhitespaces(bodyStatement)) {
+ if (str == null && bodyStatement != null && !Strings.containsOnlyWhitespaces(bodyStatement)) {
return bodyStatement;
}
return str;

Back to the top