From 6bc87f5d3be68b8ce0bc3751eea21a08eb5c1ede Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 12 Jun 2006 13:42:29 +0000 Subject: [PATCH] Clean up user data. (#344624, Christian Weiske) 2006-06-12 Matthias Clasen * gtk/gtktreemodelfilter.c (gtk_tree_model_filter_finalize): Clean up user data. (#344624, Christian Weiske) --- ChangeLog | 3 +++ ChangeLog.pre-2-10 | 3 +++ gtk/gtktreemodelfilter.c | 8 +++++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ddad3ee85b..37e319ec4a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-06-12 Matthias Clasen + * gtk/gtktreemodelfilter.c (gtk_tree_model_filter_finalize): + Clean up user data. (#344624, Christian Weiske) + * NEWS: Updates * gtk/gtkprintjob.c: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index ddad3ee85b..37e319ec4a 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,8 @@ 2006-06-12 Matthias Clasen + * gtk/gtktreemodelfilter.c (gtk_tree_model_filter_finalize): + Clean up user data. (#344624, Christian Weiske) + * NEWS: Updates * gtk/gtkprintjob.c: diff --git a/gtk/gtktreemodelfilter.c b/gtk/gtktreemodelfilter.c index e194035b16..7d16935aed 100644 --- a/gtk/gtktreemodelfilter.c +++ b/gtk/gtktreemodelfilter.c @@ -97,7 +97,7 @@ struct _GtkTreeModelFilterPrivate GType *modify_types; GtkTreeModelFilterModifyFunc modify_func; gpointer modify_data; - gpointer modify_destroy; + GtkDestroyNotify modify_destroy; gint visible_column; @@ -372,6 +372,12 @@ gtk_tree_model_filter_finalize (GObject *object) if (filter->priv->modify_types) g_free (filter->priv->modify_types); + + if (filter->priv->modify_destroy) + filter->priv->modify_destroy (filter->priv->modify_data); + + if (filter->priv->visible_destroy) + filter->priv->visible_destroy (filter->priv->visible_data); /* must chain up */ G_OBJECT_CLASS (gtk_tree_model_filter_parent_class)->finalize (object);