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



commit adcfd940a80eab5e9458b6d91134e3141bebf060
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 efa10dd..39a2e81 100644
--- a/src/gs-shell-installed.c
+++ b/src/gs-shell-installed.c
@@ -358,9 +358,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]