From 0f4e67df6829d8846100221f5dd01de907776d59 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sun, 2 Oct 2011 05:27:41 +0200 Subject: [PATCH] filesystemmodel: Add a missing check Paths with depth > 1 should return FALSE instead of pretending the depth is 1. --- gtk/gtkfilesystemmodel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/gtkfilesystemmodel.c b/gtk/gtkfilesystemmodel.c index 1ba14d3eb..a673b13bf 100644 --- a/gtk/gtkfilesystemmodel.c +++ b/gtk/gtkfilesystemmodel.c @@ -513,6 +513,9 @@ gtk_file_system_model_get_iter (GtkTreeModel *tree_model, { g_return_val_if_fail (gtk_tree_path_get_depth (path) > 0, FALSE); + if (gtk_tree_path_get_depth (path) > 1) + return FALSE; + return gtk_file_system_model_iter_nth_child (tree_model, iter, NULL,