1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-12 18:55:38 +02:00

Fixed an NPE.

Change-Id: If2455671e50e99a662d469febc8e5babf7fc24e3
This commit is contained in:
Sergey Prigogin 2015-05-08 14:40:30 -07:00
parent cfd51db02b
commit ef33d0d299

View file

@ -29,6 +29,7 @@ import org.eclipse.cdt.core.dom.ast.ASTVisitor;
import org.eclipse.cdt.core.dom.ast.DOMException; import org.eclipse.cdt.core.dom.ast.DOMException;
import org.eclipse.cdt.core.dom.ast.IASTDeclarator; import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
import org.eclipse.cdt.core.dom.ast.IASTFileLocation; import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
import org.eclipse.cdt.core.dom.ast.IASTName;
import org.eclipse.cdt.core.dom.ast.IASTNode; import org.eclipse.cdt.core.dom.ast.IASTNode;
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit; import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
import org.eclipse.cdt.core.dom.ast.IBinding; import org.eclipse.cdt.core.dom.ast.IBinding;
@ -125,7 +126,9 @@ public class OverrideIndicatorManager implements ICReconcilingListener {
return PROCESS_CONTINUE; return PROCESS_CONTINUE;
} }
IASTDeclarator decl = ASTQueries.findInnermostDeclarator(declarator); IASTDeclarator decl = ASTQueries.findInnermostDeclarator(declarator);
IBinding binding = decl.getName().resolveBinding(); IASTName name = decl.getName();
if (name != null) {
IBinding binding = name.resolveBinding();
if (binding instanceof ICPPMethod) { if (binding instanceof ICPPMethod) {
ICPPMethod method = (ICPPMethod) binding; ICPPMethod method = (ICPPMethod) binding;
try { try {
@ -151,6 +154,7 @@ public class OverrideIndicatorManager implements ICReconcilingListener {
} catch (DOMException e) { } catch (DOMException e) {
} }
} }
}
return PROCESS_CONTINUE; return PROCESS_CONTINUE;
} }
} }