1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-13 20:15:22 +02:00

Bug 364920: NPE using call hierarchy

This commit is contained in:
Markus Schorn 2011-12-21 15:19:29 +01:00
parent 79f305532d
commit 77e2eefe30

View file

@ -32,6 +32,7 @@ import org.eclipse.cdt.core.dom.ast.IASTNode;
import org.eclipse.cdt.core.dom.ast.IBinding; import org.eclipse.cdt.core.dom.ast.IBinding;
import org.eclipse.cdt.core.dom.ast.IEnumerator; import org.eclipse.cdt.core.dom.ast.IEnumerator;
import org.eclipse.cdt.core.dom.ast.IFunction; import org.eclipse.cdt.core.dom.ast.IFunction;
import org.eclipse.cdt.core.dom.ast.IScope;
import org.eclipse.cdt.core.dom.ast.IVariable; import org.eclipse.cdt.core.dom.ast.IVariable;
import org.eclipse.cdt.core.dom.ast.c.ICExternalBinding; import org.eclipse.cdt.core.dom.ast.c.ICExternalBinding;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionCallExpression; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionCallExpression;
@ -297,7 +298,8 @@ public class CallHierarchyUI {
if (binding instanceof IVariable) { if (binding instanceof IVariable) {
try { try {
if (binding.getScope().getKind() == EScopeKind.eLocal) final IScope scope = binding.getScope();
if (scope != null && scope.getKind() == EScopeKind.eLocal)
return false; return false;
} catch (DOMException e) { } catch (DOMException e) {
} }