GtkTreeView has this special case that iter==NULL means the root node. Reported-by: Dibyendu Majumdar <mobile@xxxxxxxxxxxxxxx> Signed-off-by: Christopher Li <sparse@xxxxxxxxxxx> --- ast-model.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ast-model.c b/ast-model.c index 63d2762..cbd82db 100644 --- a/ast-model.c +++ b/ast-model.c @@ -401,7 +401,8 @@ static gint ast_iter_n_children (GtkTreeModel *tree_model, GtkTreeIter *iter) { - AstNode *node = iter->user_data; + AstNode *node = iter ? iter->user_data + : AST_NODE(tree_model); inspect_child_node(node); return node->childnodes->len; -- 2.13.3 -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html