Outstanding patches, #58347

The problem is the following:
The g_return_if_fail argument checking in that function is a bit too strict.
You can see it if you select
"GtkTreeModelSort wrapping GtkTreeStore" in testtreeview.
Its just the checking, the code works fine with a NULL iter.

A very simple fix, ok to commit ? (I hope that I'm not getting too annoying
with all these questions
about trivial patches, I'll work my way to the more interesting ones...)

Index: gtk/gtktreestore.c
RCS file: /cvs/gnome/gtk+/gtk/gtktreestore.c,v
retrieving revision 1.42
diff -u -3 -p -u -r1.42 gtktreestore.c
--- gtk/gtktreestore.c	2001/07/30 05:34:55	1.42
+++ gtk/gtktreestore.c	2001/07/31 17:48:05
@@ -609,8 +609,7 @@ gtk_tree_store_iter_n_children (GtkTreeM
   gint i = 0;

   g_return_val_if_fail (GTK_IS_TREE_STORE (tree_model), 0);
-  g_return_val_if_fail (iter != NULL, FALSE);
-  g_return_val_if_fail (iter->user_data != NULL, FALSE);
+  g_return_val_if_fail (iter == NULL || iter->user_data != NULL, FALSE);

   if (iter == NULL)
     node = G_NODE (GTK_TREE_STORE (tree_model)->root)->children;

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]