summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libappstream-glib/as-app.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/libappstream-glib/as-app.c b/libappstream-glib/as-app.c
index 4eeacf6..a44bd9f 100644
--- a/libappstream-glib/as-app.c
+++ b/libappstream-glib/as-app.c
@@ -4880,6 +4880,7 @@ as_app_node_parse_dep11 (AsApp *app, GNode *node,
GNode *c;
GNode *c2;
GNode *n;
+ const gchar *nonfatal_str = NULL;
const gchar *tmp;
for (n = node->children; n != NULL; n = n->next) {
@@ -4936,8 +4937,14 @@ as_app_node_parse_dep11 (AsApp *app, GNode *node,
continue;
}
if (g_strcmp0 (tmp, "Categories") == 0) {
- for (c = n->children; c != NULL; c = c->next)
- as_app_add_category (app, as_yaml_node_get_key (c));
+ for (c = n->children; c != NULL; c = c->next) {
+ tmp = as_yaml_node_get_key (c);
+ if (tmp == NULL) {
+ nonfatal_str = "contained empty category";
+ continue;
+ }
+ as_app_add_category (app, tmp);
+ }
continue;
}
if (g_strcmp0 (tmp, "Icon") == 0) {
@@ -5058,6 +5065,10 @@ as_app_node_parse_dep11 (AsApp *app, GNode *node,
continue;
}
}
+ if (nonfatal_str != NULL) {
+ g_debug ("nonfatal warning from %s: %s",
+ as_app_get_id (app), nonfatal_str);
+ }
return TRUE;
}