From 3b9907270084a6bd9edb72206ecaa34312370f09 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 15 Aug 2013 23:22:12 -0500 Subject: Make sure we've got an icon str before setting it --- src/app-section.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/app-section.c') diff --git a/src/app-section.c b/src/app-section.c index b7b557a..aad994d 100644 --- a/src/app-section.c +++ b/src/app-section.c @@ -411,7 +411,9 @@ app_section_update_menu (AppSection *self) item = g_menu_item_new (g_app_info_get_name (G_APP_INFO (priv->appinfo)), "launch"); g_menu_item_set_attribute (item, "x-canonical-type", "s", "ImAppMenuItem"); iconstr = g_icon_to_string (g_app_info_get_icon (G_APP_INFO (priv->appinfo))); - g_menu_item_set_attribute (item, "x-canonical-icon", "s", iconstr); + if (iconstr != NULL) { + g_menu_item_set_attribute (item, "x-canonical-icon", "s", iconstr); + } g_free (iconstr); g_menu_append_item (priv->menu, item); -- cgit v1.2.3