about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--lr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lr.c b/lr.c
index ae19843..d5fff03 100644
--- a/lr.c
+++ b/lr.c
@@ -1535,6 +1535,8 @@ fitree_insert(struct fitree *node, struct fileinfo *fi)
 void
 fitree_walk(struct fitree *node, void (*visit)(struct fileinfo *))
 {
+	if (!node)
+		return;
 	if (node->left != &fitree_sentinel)
 		fitree_walk(node->left, visit);
 	visit(node->fi);