[gnome-software/wip/temp/ubuntu-xenial-rebased-corrected: 131/331] Don't perform a lookup when the category is NULL



commit ea25e07c52fc26e4e25a1bd4ea71be71e0357546
Author: William Hua <william hua canonical com>
Date:   Mon Feb 29 17:44:40 2016 -0500

    Don't perform a lookup when the category is NULL
    
    Some desktop files like fslint.desktop have a NULL category entry that
    causes a segfault when trying to do a lookup in get_app_folder ().

 src/gs-folders.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-folders.c b/src/gs-folders.c
index ad92b07..02768e4 100644
--- a/src/gs-folders.c
+++ b/src/gs-folders.c
@@ -450,6 +450,7 @@ static GsFolder *
 get_app_folder (GsFolders *folders, const gchar *app, GPtrArray *categories)
 {
        GsFolder *folder;
+       const gchar *category;
        guint i;
 
        folder = g_hash_table_lookup (folders->apps, app);


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