unref the thumbnail when we're done with it

2007-05-13  Jens Granseuer  <jensgr@gmx.net>

	* appearance-themes.c: (theme_thumbnail_func): unref the thumbnail when
	we're done with it

svn path=/trunk/; revision=7618
This commit is contained in:
Jens Granseuer 2007-05-13 19:33:50 +00:00 committed by Jens Granseuer
parent 0b671b7b69
commit 91e5a65efa
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2007-05-13 Jens Granseuer <jensgr@gmx.net>
* appearance-themes.c: (theme_thumbnail_func): unref the thumbnail when
we're done with it
2007-05-13 Thomas Wood <thos@gnome.org>
* appearance-themes.c: (theme_thumbnail_func): Don't free data we don't own.

View file

@ -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)