diff options
author | Benjamin Otte <otte@redhat.com> | 2011-10-02 05:27:41 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2011-10-03 18:29:21 +0200 |
commit | e97b05acbd5dcc2c02a9c2748c13d96bf25f75a3 (patch) | |
tree | c4a10602e0c18ab450ac31b3a4bd4256b24bf3eb /gtk/gtkfilesystemmodel.c | |
parent | eb8c2dfae297f340279e2a1c848b14584f0c1dc7 (diff) | |
download | gtk+-e97b05acbd5dcc2c02a9c2748c13d96bf25f75a3.tar.gz |
filesystemmodel: Add a missing check
Paths with depth > 1 should return FALSE instead of pretending the depth
is 1.
Diffstat (limited to 'gtk/gtkfilesystemmodel.c')
-rw-r--r-- | gtk/gtkfilesystemmodel.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtkfilesystemmodel.c b/gtk/gtkfilesystemmodel.c index 92f44ddbf4..15497e645f 100644 --- a/gtk/gtkfilesystemmodel.c +++ b/gtk/gtkfilesystemmodel.c @@ -512,6 +512,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, |