Skip to content

Commit

Permalink
Check for null content
Browse files Browse the repository at this point in the history
  • Loading branch information
lwindolf committed Mar 14, 2024
1 parent cec2038 commit bb0ffb7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/item.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,14 @@ item_to_xml (LifereaItem *item, gpointer xmlNode)
if (item_get_description (item)) {
/* Prefer full article over feed inline content */
const gchar *content = metadata_list_get (item->metadata, "richContent");
if (NULL == content)
if (!content)
content = item_get_description (item);

tmp = xhtml_strip_dhtml (content);
xmlNewTextChild (itemNode, NULL, BAD_CAST "description", BAD_CAST tmp);
g_free (tmp);
if (content) {
tmp = xhtml_strip_dhtml (content);
xmlNewTextChild (itemNode, NULL, BAD_CAST "description", BAD_CAST tmp);
g_free (tmp);
}
}

if (item_get_source (item))
Expand Down

0 comments on commit bb0ffb7

Please sign in to comment.