[gnome-software/gnome-3-20] trivial: Fix critical warning with broken AppStream data



commit 004ccfd5b33d333e678c69a12d5ce1c17b3a6a85
Author: Richard Hughes <richard hughsie com>
Date:   Sun Apr 17 11:23:09 2016 +0100

    trivial: Fix critical warning with broken AppStream data

 src/gs-shell-installed.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/gs-shell-installed.c b/src/gs-shell-installed.c
index 9ff6817..ec21276 100644
--- a/src/gs-shell-installed.c
+++ b/src/gs-shell-installed.c
@@ -349,9 +349,10 @@ gs_shell_installed_get_app_sort_key (GsApp *app)
                g_string_append (key, "2:");
 
        /* finally, sort by short name */
-       casefolded_name = g_utf8_casefold (gs_app_get_name (app), -1);
-       g_string_append (key, casefolded_name);
-
+       if (gs_app_get_name (app) != NULL) {
+               casefolded_name = g_utf8_casefold (gs_app_get_name (app), -1);
+               g_string_append (key, casefolded_name);
+       }
        return g_string_free (key, FALSE);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]