Commit 6e1d6197 authored by Christian Hergert's avatar Christian Hergert
Browse files

tree: force clear model upon tree destruction

This helps us ensure that the tree is destroyed during cleanup which makes
tracking leaks easier.
parent bb90a9fa
......@@ -1086,9 +1086,16 @@ dzl_tree_destroy (GtkWidget *widget)
g_assert (DZL_IS_TREE (self));
gtk_tree_view_set_model (GTK_TREE_VIEW (self), NULL);
if (priv->store != NULL)
gtk_tree_store_clear (GTK_TREE_STORE (priv->store));
g_clear_object (&priv->store);
g_clear_pointer (&priv->last_drop_path, gtk_tree_path_free);
g_clear_pointer (&priv->builders, g_ptr_array_unref);
g_clear_object (&priv->store);
g_clear_object (&priv->root);
g_clear_object (&priv->context_menu);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment