mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-13 03:55:22 +02:00
Bug 364920: NPE using call hierarchy
This commit is contained in:
parent
79f305532d
commit
77e2eefe30
1 changed files with 3 additions and 1 deletions
|
@ -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.IEnumerator;
|
||||
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.c.ICExternalBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionCallExpression;
|
||||
|
@ -297,7 +298,8 @@ public class CallHierarchyUI {
|
|||
|
||||
if (binding instanceof IVariable) {
|
||||
try {
|
||||
if (binding.getScope().getKind() == EScopeKind.eLocal)
|
||||
final IScope scope = binding.getScope();
|
||||
if (scope != null && scope.getKind() == EScopeKind.eLocal)
|
||||
return false;
|
||||
} catch (DOMException e) {
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue