[gtk/wip/sadiq/model-fixes: 2/2] treelistmodel: Fix double g_object_ref()



commit 283a06c7bc8c212f31123dccc26f80197082f31f
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date:   Tue Sep 18 07:28:56 2018 +0530

    treelistmodel: Fix double g_object_ref()
    
    gtk_tree_list_model_init_node() increases the reference count
    of the model passed. So don't add a refernce when we pass the
    model

 gtk/gtktreelistmodel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtktreelistmodel.c b/gtk/gtktreelistmodel.c
index a7f6619d82..34ae7d59ed 100644
--- a/gtk/gtktreelistmodel.c
+++ b/gtk/gtktreelistmodel.c
@@ -778,7 +778,7 @@ gtk_tree_list_model_new (gboolean                         passthrough,
   self->user_data = user_data;
   self->user_destroy = user_destroy;
 
-  gtk_tree_list_model_init_node (self, &self->root_node, g_object_ref (root));
+  gtk_tree_list_model_init_node (self, &self->root_node, root);
 
   return self;
 }


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