summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Ridge2013-09-07 02:51:25 (EDT)
committerMarc-Andre Laperle2013-09-08 00:11:14 (EDT)
commit1305966d854a545190d774a9ef86cd31d5cc75bd (patch)
tree2cd37977c23be6a9fa821aba6d87226550ff2452
parent37d6d1dc20d469122169f0f005598070e2621061 (diff)
downloadorg.eclipse.cdt-1305966d854a545190d774a9ef86cd31d5cc75bd.zip
org.eclipse.cdt-1305966d854a545190d774a9ef86cd31d5cc75bd.tar.gz
org.eclipse.cdt-1305966d854a545190d774a9ef86cd31d5cc75bd.tar.bz2
Bug 414279 - Fix an NPE
Change-Id: Ib2ec70e74bc56364dbaf3756162626683eba70e1 Signed-off-by: Nathan Ridge <zeratul976@hotmail.com> Reviewed-on: https://git.eclipse.org/r/16201 Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com> IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com> Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java3
1 files changed, 2 insertions, 1 deletions
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 9fb71d6..20fb23c 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
@@ -852,7 +852,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;
}
}