diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java index 57a23396f58..5230be61a46 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java @@ -855,7 +855,8 @@ public class CPPVisitor extends ASTQueries { if (function.getOwner() instanceof ICPPClassType) { // Don't consider a function brought into scope from a base class scope // to be the same as a function declared in a derived class scope. - if (!((ICPPClassType) function.getOwner()).getCompositeScope().equals(scope)) { + IScope bindingScope = ((ICPPClassType) function.getOwner()).getCompositeScope(); + if (bindingScope == null || !bindingScope.equals(scope)) { sameFunction = false; } }