mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
places sidebar: Plug a small memory leak
_gtk_trash_moniotr_get_icon is transfer full, so we have to unref the icon.
This commit is contained in:
parent
b6b53fc19c
commit
5dabfa7b39
@ -894,8 +894,13 @@ static void
|
||||
update_trash_icon (GtkPlacesSidebar *sidebar)
|
||||
{
|
||||
if (sidebar->trash_row)
|
||||
gtk_sidebar_row_set_icon (GTK_SIDEBAR_ROW (sidebar->trash_row),
|
||||
_gtk_trash_monitor_get_icon (sidebar->trash_monitor));
|
||||
{
|
||||
GIcon *icon;
|
||||
|
||||
icon = _gtk_trash_monitor_get_icon (sidebar->trash_monitor);
|
||||
gtk_sidebar_row_set_icon (GTK_SIDEBAR_ROW (sidebar->trash_row), icon);
|
||||
g_object_unref (icon);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user