1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-19 23:15:24 +02:00

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>
This commit is contained in:
Nathan Ridge 2013-09-07 02:51:25 -04:00 committed by Sergey Prigogin
parent 3bf07e8a61
commit e8cf0cdce9

View file

@ -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;
}
}