[gnome-control-center] shell: fix refcounting in GMenu code (1/2)



commit 68bfa875cfe49fc08060e02ba31f9fd734e06a4d
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Wed Dec 12 20:13:02 2012 +0100

    shell: fix refcounting in GMenu code (1/2)
    
    gmenu_tree_entry_get_app_info() does not return a new reference
    
    https://bugzilla.gnome.org/show_bug.cgi?id=690117

 shell/cc-shell-model.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/shell/cc-shell-model.c b/shell/cc-shell-model.c
index 5ae2fbe..3eb5da7 100644
--- a/shell/cc-shell-model.c
+++ b/shell/cc-shell-model.c
@@ -136,10 +136,8 @@ cc_shell_model_add_item (CcShellModel   *model,
   const gchar *comment = g_app_info_get_description (appinfo);
   GdkPixbuf *pixbuf = NULL;
   const char * const * keywords;
-  GDesktopAppInfo *app;
 
-  app = gmenu_tree_entry_get_app_info (item);
-  keywords = g_desktop_app_info_get_keywords (app);
+  keywords = g_desktop_app_info_get_keywords (G_DESKTOP_APP_INFO (appinfo));
 
   pixbuf = load_pixbuf_for_gicon (icon);
 
@@ -153,6 +151,4 @@ cc_shell_model_add_item (CcShellModel   *model,
                                      COL_GICON, icon,
                                      COL_KEYWORDS, keywords,
                                      -1);
-
-  g_object_unref (app);
 }



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