[gnome-software] trivial: Only print the number of related packages	if there have been some set
- From: Richard Hughes <rhughes src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gnome-software] trivial: Only print the number of related packages	if there have been some set
 
- Date: Wed, 11 Sep 2013 13:15:18 +0000 (UTC)
 
commit 5130a597b09c83107767c8193553a3dbf8ee494e
Author: Richard Hughes <richard hughsie com>
Date:   Wed Sep 11 13:59:48 2013 +0100
    trivial: Only print the number of related packages if there have been some set
 src/gs-app.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-app.c b/src/gs-app.c
index 228e9a5..c00a5e6 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -191,8 +191,7 @@ gs_app_to_string (GsApp *app)
                g_string_append_printf (str, "\tfeatured-pixbuf:\t%p\n", priv->featured_pixbuf);
         if (priv->install_date != 0)
                 g_string_append_printf (str, "\tinstall-date: %lu\n", priv->install_date);
-
-       if (priv->related != NULL)
+       if (priv->related->len > 0)
                g_string_append_printf (str, "\trelated:\t%i\n", priv->related->len);
        if (priv->history->len > 0)
                g_string_append_printf (str, "\thistory:\t%i\n", priv->history->len);
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]