unref the thumbnail image after passing it to the callback. Callers will
2008-04-20 Jens Granseuer <jensgr@gmx.net> * theme-thumbnail.c: (message_from_child): unref the thumbnail image after passing it to the callback. Callers will have to ref it if they want to keep it until after the callback has returned 2008-04-20 Jens Granseuer <jensgr@gmx.net> * appearance-style.c: (update_thumbnail_in_treeview): * appearance-themes.c: (theme_thumbnail_update), (theme_thumbnail_generate): adapt to modified refcounting in the thumbnailer; thumbnails don't need to be unref'ed unless we explicitly retain a reference svn path=/trunk/; revision=8661
This commit is contained in:
parent
ae6085786e
commit
10e93c23ad
5 changed files with 21 additions and 7 deletions
|
@ -114,8 +114,6 @@ theme_thumbnail_update (GdkPixbuf *pixbuf,
|
|||
g_free (path);
|
||||
}
|
||||
}
|
||||
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
|
||||
static GdkPixbuf *
|
||||
|
@ -159,9 +157,10 @@ theme_thumbnail_generate (GnomeThemeMetaInfo *info, AppearanceData *data)
|
|||
|
||||
thumb = theme_get_thumbnail_from_cache (info, data);
|
||||
|
||||
if (thumb != NULL)
|
||||
if (thumb != NULL) {
|
||||
theme_thumbnail_update (thumb, info->name, data, FALSE);
|
||||
else
|
||||
g_object_unref (thumb);
|
||||
} else
|
||||
generate_meta_theme_thumbnail_async (info,
|
||||
(ThemeThumbnailFunc) theme_thumbnail_done_cb, data, NULL);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue