[gnome-software] search provider: Don't crash for apps with missing icons
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] search provider: Don't crash for apps with missing icons
- Date: Mon, 31 Mar 2014 21:24:48 +0000 (UTC)
commit 93ce15f540cb54671de65111c50054a73b2c8d78
Author: Kalev Lember <kalevlember gmail com>
Date: Mon Mar 31 23:21:18 2014 +0200
search provider: Don't crash for apps with missing icons
https://bugzilla.redhat.com/show_bug.cgi?id=1082810
src/gs-shell-search-provider.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-shell-search-provider.c b/src/gs-shell-search-provider.c
index b578a53..0a53b30 100644
--- a/src/gs-shell-search-provider.c
+++ b/src/gs-shell-search-provider.c
@@ -225,7 +225,8 @@ handle_get_result_metas (GsShellSearchProvider2 *skeleton,
g_variant_builder_add (&meta, "{sv}", "id", g_variant_new_string (gs_app_get_id (app)));
g_variant_builder_add (&meta, "{sv}", "name", g_variant_new_string (gs_app_get_name (app)));
pixbuf = gs_app_get_pixbuf (app);
- g_variant_builder_add (&meta, "{sv}", "icon", g_icon_serialize (G_ICON (pixbuf)));
+ if (pixbuf != NULL)
+ g_variant_builder_add (&meta, "{sv}", "icon", g_icon_serialize (G_ICON (pixbuf)));
g_variant_builder_add (&meta, "{sv}", "description", g_variant_new_string (gs_app_get_summary
(app)));
meta_variant = g_variant_builder_end (&meta);
g_hash_table_insert (self->metas_cache, g_strdup (gs_app_get_id (app)), g_variant_ref_sink
(meta_variant));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]