[gtk+] treemodelrefcount: check_iter(): check if iter is valid



commit 1158ed5795a3146ddc3c62cad8bcc9160dac3660
Author: Kristian Rietveld <kris gtk org>
Date:   Sun Jul 10 17:37:05 2011 +0200

    treemodelrefcount: check_iter(): check if iter is valid

 gtk/tests/gtktreemodelrefcount.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/tests/gtktreemodelrefcount.c b/gtk/tests/gtktreemodelrefcount.c
index 974a896..9c91a58 100644
--- a/gtk/tests/gtktreemodelrefcount.c
+++ b/gtk/tests/gtktreemodelrefcount.c
@@ -222,6 +222,9 @@ check_iter (GtkTreeModelRefCount *ref_model,
 {
   NodeInfo *info;
 
+  if (may_assert)
+    g_assert (gtk_tree_store_iter_is_valid (GTK_TREE_STORE (ref_model), iter));
+
   info = g_hash_table_lookup (ref_model->priv->node_hash, iter->user_data);
   if (!info)
     {



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