[gnome-shell] Unref GIcon we use internally



commit 19fa0b5d5b0b520f05de60c93d68da9f1f612ce8
Author: Colin Walters <walters verbum org>
Date:   Wed Sep 16 19:44:38 2009 -0400

    Unref GIcon we use internally
    
    https://bugzilla.gnome.org/show_bug.cgi?id=595321

 src/shell-app-system.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/shell-app-system.c b/src/shell-app-system.c
index dfdc828..3c4a9d6 100644
--- a/src/shell-app-system.c
+++ b/src/shell-app-system.c
@@ -984,14 +984,18 @@ shell_app_info_create_icon_texture (ShellAppInfo *info, float size)
     }
 
   icon = shell_app_info_get_icon (info);
-  if (!icon)
+  if (icon == NULL)
     {
       ret = clutter_texture_new ();
       g_object_set (ret, "opacity", 0, "width", size, "height", size, NULL);
-      return ret;
+    }
+  else
+    {
+      ret = shell_texture_cache_load_gicon (shell_texture_cache_get_default (), icon, (int)size);
+      g_object_unref (icon);
     }
 
-  return shell_texture_cache_load_gicon (shell_texture_cache_get_default (), icon, (int)size);
+  return ret;
 }
 
 /**



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