[nautilus] file: unref emblem



commit 2dc2983789b97c8faaf69db3a220a5d96ca82e9d
Author: Ernestas Kulik <ernestask src gnome org>
Date:   Sat Nov 12 21:34:06 2016 +0200

    file: unref emblem
    
    The emblem acquired in apply_emblems_to_icon () is not unreffed as it
    should be, since g_emblemed_icon_add_emblem () adds a ref to it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=774232

 src/nautilus-file.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-file.c b/src/nautilus-file.c
index 9ac9b51..26a7672 100644
--- a/src/nautilus-file.c
+++ b/src/nautilus-file.c
@@ -5104,7 +5104,6 @@ apply_emblems_to_icon (NautilusFile          *file,
                        NautilusFileIconFlags  flags)
 {
     GIcon *emblemed_icon;
-    GEmblem *emblem;
     GList *emblems, *l;
 
     emblemed_icon = NULL;
@@ -5112,6 +5111,8 @@ apply_emblems_to_icon (NautilusFile          *file,
 
     for (l = emblems; l != NULL; l = l->next)
     {
+        g_autoptr (GEmblem) emblem = NULL;
+
         if (g_icon_equal (l->data, icon))
         {
             continue;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]