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:
@@ -893,8 +893,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
|
||||
|
||||
Reference in New Issue
Block a user