From 0a81559841ca36913b403288a8f0f2ac2f1976d2 Mon Sep 17 00:00:00 2001 From: Emanuel Graf Date: Tue, 6 Jul 2010 12:04:01 +0000 Subject: [PATCH] Bug 318130: Exception when extracting a function https://bugs.eclipse.org/bugs/show_bug.cgi?id=318130 --- .../org/eclipse/cdt/internal/ui/refactoring/NodeContainer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/NodeContainer.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/NodeContainer.java index 5d60c082c4e..cb310ec317d 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/NodeContainer.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/NodeContainer.java @@ -202,7 +202,7 @@ public class NodeContainer { } public boolean isDeclarationInScope() { - if(declaration.toCharArray().length > 0) { + if(declaration != null && declaration.toCharArray().length > 0) { int declOffset = declaration.getFileLocation().getNodeOffset(); return declOffset >= getStartOffset() && declOffset <= getEndOffset();