From: Alexandre Terrasa Date: Mon, 6 Nov 2017 19:40:23 +0000 (-0500) Subject: contrib/rss_downloader: fix nullable usage for title and link X-Git-Url: http://nitlanguage.org contrib/rss_downloader: fix nullable usage for title and link Signed-off-by: Alexandre Terrasa --- diff --git a/contrib/rss_downloader/src/rss_downloader.nit b/contrib/rss_downloader/src/rss_downloader.nit index a738c05..022543e 100644 --- a/contrib/rss_downloader/src/rss_downloader.nit +++ b/contrib/rss_downloader/src/rss_downloader.nit @@ -274,6 +274,16 @@ redef class Text var title = item[tool_config.as(not null).tag_title].first.as(XMLStartTag).data var link = item[tool_config.as(not null).tag_link].first.as(XMLStartTag).data + if title == null then + print_error "RSS Parse Error: title is null" + return elements + end + + if link == null then + print_error "RSS Parse Error: link is null" + return elements + end + elements.add new Element(title, link) end