From 91e5a65efa80364c2718e4cdd0aaf7ae2e86884a Mon Sep 17 00:00:00 2001 From: Jens Granseuer Date: Sun, 13 May 2007 19:33:50 +0000 Subject: [PATCH] unref the thumbnail when we're done with it 2007-05-13 Jens Granseuer * appearance-themes.c: (theme_thumbnail_func): unref the thumbnail when we're done with it svn path=/trunk/; revision=7618 --- capplets/appearance/ChangeLog | 5 +++++ capplets/appearance/appearance-themes.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/capplets/appearance/ChangeLog b/capplets/appearance/ChangeLog index 3357ceb46..c60f4a09d 100644 --- a/capplets/appearance/ChangeLog +++ b/capplets/appearance/ChangeLog @@ -1,3 +1,8 @@ +2007-05-13 Jens Granseuer + + * appearance-themes.c: (theme_thumbnail_func): unref the thumbnail when + we're done with it + 2007-05-13 Thomas Wood * appearance-themes.c: (theme_thumbnail_func): Don't free data we don't own. diff --git a/capplets/appearance/appearance-themes.c b/capplets/appearance/appearance-themes.c index 3a6e6d576..3796f1932 100644 --- a/capplets/appearance/appearance-themes.c +++ b/capplets/appearance/appearance-themes.c @@ -131,7 +131,7 @@ theme_thumbnail_func (GdkPixbuf *pixbuf, struct theme_thumbnail_func_data *data) GtkTreeModel *model = GTK_TREE_MODEL (data->store); /* find item in model and update thumbnail */ - if (gtk_tree_model_get_iter_first (model, &iter)) { + if (pixbuf && gtk_tree_model_get_iter_first (model, &iter)) { do { gchar *name; @@ -153,6 +153,9 @@ theme_thumbnail_func (GdkPixbuf *pixbuf, struct theme_thumbnail_func_data *data) } while (gtk_tree_model_iter_next (model, &iter)); } + if (pixbuf) + g_object_unref (pixbuf); + data->list = g_list_remove (data->list, info); if (data->list)