[gnome-software] trivial: Don't auto-keyword AppStream files with blank origins
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Don't auto-keyword AppStream files with blank origins
- Date: Wed, 8 Jun 2016 19:14:52 +0000 (UTC)
commit 8848254754f127d6dbfc1247dc35e1b76bfedbf6
Author: Richard Hughes <richard hughsie com>
Date: Wed Jun 8 20:14:19 2016 +0100
trivial: Don't auto-keyword AppStream files with blank origins
src/plugins/gs-plugin-appstream.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/gs-plugin-appstream.c b/src/plugins/gs-plugin-appstream.c
index 42bada1..279eafd 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -110,6 +110,8 @@ gs_plugin_appstream_get_origins_hash (GPtrArray *array)
keys = g_hash_table_get_keys (origins);
for (l = keys; l != NULL; l = l->next) {
tmp = l->data;
+ if (tmp == NULL || tmp[0] == '\0')
+ continue;
cnt = g_hash_table_lookup (origins, tmp);
perc = (100.f / (gdouble) array->len) * (gdouble) (*cnt);
g_debug ("origin %s provides %i apps (%.0f%%)", tmp, *cnt, perc);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]