Fixed NPE in PyUnusedLocalInspectionVisitor.visitPyCallExpression()

This commit is contained in:
Andrey Vlasovskikh
2014-01-13 20:22:55 +04:00
parent 56738b2a67
commit 925b976967
@@ -207,7 +207,8 @@ public class PyUnusedLocalInspectionVisitor extends PyInspectionVisitor {
owner.acceptChildren(new PyRecursiveElementVisitor(){
@Override
public void visitPyCallExpression(final PyCallExpression node) {
if ("locals".equals(node.getCallee().getName())){
final PyExpression callee = node.getCallee();
if (callee != null && "locals".equals(callee.getName())){
throw new DontPerformException();
}
node.acceptChildren(this); // look at call expr in arguments