[gnome-software] local-ratings: Do not attempt to look up a NULL application ID



commit ad4f7fe404712f4f3168b86d62be68cddef83ff7
Author: Richard Hughes <richard hughsie com>
Date:   Thu Dec 19 09:43:13 2013 +0000

    local-ratings: Do not attempt to look up a NULL application ID

 src/plugins/gs-plugin-local-ratings.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/gs-plugin-local-ratings.c b/src/plugins/gs-plugin-local-ratings.c
index 0edb465..1c677c0 100644
--- a/src/plugins/gs-plugin-local-ratings.c
+++ b/src/plugins/gs-plugin-local-ratings.c
@@ -228,6 +228,8 @@ gs_plugin_refine (GsPlugin *plugin,
        /* add any missing ratings data */
        for (l = list; l != NULL; l = l->next) {
                app = GS_APP (l->data);
+               if (gs_app_get_id (app) == NULL)
+                       continue;
                if (gs_app_get_rating (app) != -1)
                        continue;
                rating = gs_plugin_local_find_app (plugin, gs_app_get_id (app));


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