Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmanuel Graf2010-07-01 04:12:10 -0400
committerEmanuel Graf2010-07-01 04:12:10 -0400
commit368736adaf1b374ce69d204b2e25e279cf038eb3 (patch)
treebfbada07c3137eea82e83f3fb94e5c00e4727a5d /core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter
parentfe6b056773632135366ace74a1630afb6c5a48fa (diff)
downloadorg.eclipse.cdt-368736adaf1b374ce69d204b2e25e279cf038eb3.tar.gz
org.eclipse.cdt-368736adaf1b374ce69d204b2e25e279cf038eb3.tar.xz
org.eclipse.cdt-368736adaf1b374ce69d204b2e25e279cf038eb3.zip
Bug 318552: NPE in ExpressionWriter for unary expression without an operand
https://bugs.eclipse.org/bugs/show_bug.cgi?id=318552
Diffstat (limited to 'core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/ExpressionWriter.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/ExpressionWriter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/ExpressionWriter.java
index 3c9cce0eb1..8dbf6b354d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/ExpressionWriter.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/ExpressionWriter.java
@@ -383,7 +383,7 @@ public class ExpressionWriter extends NodeWriter{
if(isPrefixExpression(unExp )) {
scribe.print(getPrefixOperator(unExp));
}
- unExp.getOperand().accept(visitor);
+ visitNodeIfNotNull(unExp.getOperand());
if(isPostfixExpression(unExp)) {
scribe.print(getPostfixOperator(unExp));
}

Back to the top