summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libappstream-glib/as-app.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libappstream-glib/as-app.c b/libappstream-glib/as-app.c
index 6103127..77ec9a1 100644
--- a/libappstream-glib/as-app.c
+++ b/libappstream-glib/as-app.c
@@ -3992,7 +3992,8 @@ as_app_node_insert (AsApp *app, GNode *parent, AsNodeContext *ctx)
}
/* <id> */
- as_node_insert (node_app, "id", priv->id, 0, NULL);
+ if (priv->id != NULL)
+ as_node_insert (node_app, "id", priv->id, 0, NULL);
/* <priority> */
if (priv->priority != 0)