diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 8 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 8 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 8 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 8 | ||||
-rw-r--r-- | gtk/gtktreemodelsort.c | 8 |
6 files changed, 46 insertions, 2 deletions
@@ -1,3 +1,11 @@ +2003-12-17 Marco Pesenti Gritti <marco@gnome.org> + + * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_get_iter): + + Check that index is not bigger than level array length + also when depth is 1. Now get_iter_first correctly return + FALSE when the model is empty (#129411). + Wed Dec 17 23:31:19 2003 Kristian Rietveld <kris@gtk.org> * gtk/gtktreeview.c (gtk_tree_view_search_equal_func): only diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index eb21e70c26..c379ace58c 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +2003-12-17 Marco Pesenti Gritti <marco@gnome.org> + + * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_get_iter): + + Check that index is not bigger than level array length + also when depth is 1. Now get_iter_first correctly return + FALSE when the model is empty (#129411). + Wed Dec 17 23:31:19 2003 Kristian Rietveld <kris@gtk.org> * gtk/gtktreeview.c (gtk_tree_view_search_equal_func): only diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index eb21e70c26..c379ace58c 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +2003-12-17 Marco Pesenti Gritti <marco@gnome.org> + + * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_get_iter): + + Check that index is not bigger than level array length + also when depth is 1. Now get_iter_first correctly return + FALSE when the model is empty (#129411). + Wed Dec 17 23:31:19 2003 Kristian Rietveld <kris@gtk.org> * gtk/gtktreeview.c (gtk_tree_view_search_equal_func): only diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index eb21e70c26..c379ace58c 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +2003-12-17 Marco Pesenti Gritti <marco@gnome.org> + + * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_get_iter): + + Check that index is not bigger than level array length + also when depth is 1. Now get_iter_first correctly return + FALSE when the model is empty (#129411). + Wed Dec 17 23:31:19 2003 Kristian Rietveld <kris@gtk.org> * gtk/gtktreeview.c (gtk_tree_view_search_equal_func): only diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index eb21e70c26..c379ace58c 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +2003-12-17 Marco Pesenti Gritti <marco@gnome.org> + + * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_get_iter): + + Check that index is not bigger than level array length + also when depth is 1. Now get_iter_first correctly return + FALSE when the model is empty (#129411). + Wed Dec 17 23:31:19 2003 Kristian Rietveld <kris@gtk.org> * gtk/gtktreeview.c (gtk_tree_view_search_equal_func): only diff --git a/gtk/gtktreemodelsort.c b/gtk/gtktreemodelsort.c index eacb3d5c0a..ab393219c3 100644 --- a/gtk/gtktreemodelsort.c +++ b/gtk/gtktreemodelsort.c @@ -970,8 +970,12 @@ gtk_tree_model_sort_get_iter (GtkTreeModel *tree_model, level = g_array_index (level->array, SortElt, indices[i]).children; } - if (level == NULL) - return FALSE; + if (!level || indices[i] >= level->array->len) + { + iter->stamp = 0; + return FALSE; + } + iter->stamp = tree_model_sort->stamp; iter->user_data = level; iter->user_data2 = &g_array_index (level->array, SortElt, indices[depth - 1]); |