[nautilus/gnome-3-22] file: unref emblem



commit 55b00ddcf9243c4ad01f49613cce4e712cd204f7
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 c21f525..ccda3b4 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]