Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmanuel Graf2009-11-23 08:44:41 -0500
committerEmanuel Graf2009-11-23 08:44:41 -0500
commit252f33f0cdf9a1107bebf22781149177d91b7c53 (patch)
treea04eb9ea31277028c5fbf735302c1a72fd57daf1 /core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite
parent2a234109d57a8a5a63a6b8c36432df6711c18e97 (diff)
downloadorg.eclipse.cdt-252f33f0cdf9a1107bebf22781149177d91b7c53.tar.gz
org.eclipse.cdt-252f33f0cdf9a1107bebf22781149177d91b7c53.tar.xz
org.eclipse.cdt-252f33f0cdf9a1107bebf22781149177d91b7c53.zip
Fix NPE with node copys.
Diffstat (limited to 'core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/MacroExpansionHandler.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/MacroExpansionHandler.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/MacroExpansionHandler.java
index 045110df5e..54373c7985 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/MacroExpansionHandler.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/MacroExpansionHandler.java
@@ -56,7 +56,7 @@ public class MacroExpansionHandler {
}
protected boolean isStatementWithMixedLocation(IASTStatement node) {
- if(node.getNodeLocations().length > 1) {
+ if(node.getNodeLocations() != null && node.getNodeLocations().length > 1) {
for (IASTNodeLocation loc : node.getNodeLocations()) {
if (loc instanceof IASTMacroExpansionLocation) {
return true;

Back to the top