summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiovanni Campagna <gcampagna@src.gnome.org>2012-12-12 20:13:02 +0100
committerGiovanni Campagna <gcampagna@src.gnome.org>2012-12-13 15:41:43 +0100
commit68bfa875cfe49fc08060e02ba31f9fd734e06a4d (patch)
treebccd5432eac53f2f0d47063f95025ffa9a5a7c63
parente2ced1c2c33a779224acae171e277d449bfb282b (diff)
downloadgnome-control-center-68bfa875cfe49fc08060e02ba31f9fd734e06a4d.tar.gz
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
-rw-r--r--shell/cc-shell-model.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/shell/cc-shell-model.c b/shell/cc-shell-model.c
index 5ae2fbef5..3eb5da7e6 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);
}