diff options
author | Markus Schorn | 2008-02-11 07:52:47 +0000 |
---|---|---|
committer | Markus Schorn | 2008-02-11 07:52:47 +0000 |
commit | e18a68941013b8a75d42cf8c2a28325073a37513 (patch) | |
tree | fbb134181a08afc436ed048032323a554b12f64a | |
parent | 9d578b5f138aafe7a6d3dc669758bfffcb45c550 (diff) | |
download | org.eclipse.cdt-e18a68941013b8a75d42cf8c2a28325073a37513.tar.gz org.eclipse.cdt-e18a68941013b8a75d42cf8c2a28325073a37513.tar.xz org.eclipse.cdt-e18a68941013b8a75d42cf8c2a28325073a37513.zip |
Fixes a NPE, bug 218389.
-rw-r--r-- | core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPSemantics.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPSemantics.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPSemantics.java index b04d948212a..8f8fedeb4d3 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPSemantics.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPSemantics.java @@ -109,6 +109,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionTemplate; import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType; import org.eclipse.cdt.core.dom.ast.cpp.ICPPMember; import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace; import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespaceScope; import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameter; import org.eclipse.cdt.core.dom.ast.cpp.ICPPPointerToMemberType; @@ -1389,7 +1390,11 @@ public class CPPSemantics { */ static private void storeUsingDirective(CPPSemantics.LookupData data, ICPPNamespaceScope container, ICPPUsingDirective directive, Set<ICPPNamespaceScope> handled) throws DOMException { - final ICPPNamespaceScope nominated= directive.getNamespace().getNamespaceScope(); + final ICPPNamespace nsBinding = directive.getNamespace(); + if (nsBinding == null) { + return; + } + final ICPPNamespaceScope nominated= nsBinding.getNamespaceScope(); if (nominated == null || data.visited.containsKey(nominated) || (handled != null && !handled.add(nominated))) { return; } |