[gtk+] GtkIconTheme: fix regression from 0db32f0632ef4675bfcfc9ec201f7af157a48ab0



commit 9d81b69e06cd9c2ad9cb5204056bfae5a3128e9c
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Mon Mar 4 21:33:04 2013 +0100

    GtkIconTheme: fix regression from 0db32f0632ef4675bfcfc9ec201f7af157a48ab0
    
    icon_info_dup() is now called also for GtkIconInfos that already have
    a pixbuf, so we must make sure that we correctly carry that from
    the original icon_info to the copy.

 gtk/gtkicontheme.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index 5d7a2f9..5f8089f 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -3027,6 +3027,8 @@ icon_info_dup (GtkIconInfo *icon_info)
     dup->icon_file = g_object_ref (icon_info->icon_file);
   if (icon_info->loadable)
     dup->loadable = g_object_ref (icon_info->loadable);
+  if (icon_info->pixbuf)
+    dup->pixbuf = g_object_ref (icon_info->pixbuf);
 
   for (l = icon_info->emblem_infos; l != NULL; l = l->next)
     {
@@ -4906,9 +4908,11 @@ gtk_icon_theme_lookup_by_gicon (GtkIconTheme       *icon_theme,
               if (emblem_info)
                 info->emblem_infos = g_slist_prepend (info->emblem_infos, emblem_info);
             }
-        }
 
-      return info;
+          return info;
+        }
+      else
+        return NULL;
     }
   else if (GDK_IS_PIXBUF (icon))
     {


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