From 19fa0b5d5b0b520f05de60c93d68da9f1f612ce8 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 16 Sep 2009 19:44:38 -0400 Subject: [PATCH] Unref GIcon we use internally https://bugzilla.gnome.org/show_bug.cgi?id=595321 --- src/shell-app-system.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/shell-app-system.c b/src/shell-app-system.c index dfdc828a0..3c4a9d6a8 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; } /**