summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/func_calls.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/func_calls.py b/examples/func_calls.py
index 84e8c27..97a7271 100644
--- a/examples/func_calls.py
+++ b/examples/func_calls.py
@@ -26,7 +26,8 @@ class FuncCallVisitor(c_ast.NodeVisitor):
if node.name.name == self.funcname:
print('%s called at %s' % (self.funcname, node.name.coord))
# Visit args in case they contain more func calls.
- self.visit(node.args)
+ if node.args:
+ self.visit(node.args)
def show_func_calls(filename, funcname):