[gnome-software] trivial: Don't show (null) in debugging output
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Don't show (null) in debugging output
- Date: Fri, 12 May 2017 16:07:40 +0000 (UTC)
commit b45da72bd7ffa5e9aac0ddf6e55077c21cf2f027
Author: Richard Hughes <richard hughsie com>
Date: Fri May 12 10:59:23 2017 +0100
trivial: Don't show (null) in debugging output
lib/gs-app.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/lib/gs-app.c b/lib/gs-app.c
index e4b938a..4ae0705 100644
--- a/lib/gs-app.c
+++ b/lib/gs-app.c
@@ -402,13 +402,16 @@ gs_app_to_string (GsApp *app)
gs_app_get_kudos_percentage (app));
if (app->name != NULL)
gs_app_kv_lpad (str, "name", app->name);
- gs_app_kv_printf (str, "pixbuf", "%p", app->pixbuf);
+ if (app->pixbuf != NULL)
+ gs_app_kv_printf (str, "pixbuf", "%p", app->pixbuf);
for (i = 0; i < app->icons->len; i++) {
AsIcon *icon = g_ptr_array_index (app->icons, i);
gs_app_kv_lpad (str, "icon-kind",
as_icon_kind_to_string (as_icon_get_kind (icon)));
- gs_app_kv_printf (str, "icon-pixbuf", "%p",
- as_icon_get_pixbuf (icon));
+ if (as_icon_get_pixbuf (icon) != NULL) {
+ gs_app_kv_printf (str, "icon-pixbuf", "%p",
+ as_icon_get_pixbuf (icon));
+ }
if (as_icon_get_name (icon) != NULL)
gs_app_kv_lpad (str, "icon-name",
as_icon_get_name (icon));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]