From 971beea1813007a0cb71127ff739be665d9854e4 Mon Sep 17 00:00:00 2001 From: Mataes Date: Wed, 22 Apr 2020 14:36:54 +0300 Subject: newsaggregator: fixed import from files without htmlUrl tag --- protocols/NewsAggregator/Src/Options.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'protocols') diff --git a/protocols/NewsAggregator/Src/Options.cpp b/protocols/NewsAggregator/Src/Options.cpp index 9f902c52b2..cae87cf248 100644 --- a/protocols/NewsAggregator/Src/Options.cpp +++ b/protocols/NewsAggregator/Src/Options.cpp @@ -550,7 +550,7 @@ void CImportFeed::OnOk(CCtrlBase*) if (auto *pszText = node->Attribute("htmlUrl")) siteurl = mir_utf8decodeW(pszText); - if (bNeedToImport && text && url && siteurl) { + if (bNeedToImport && text && url) { CMStringW wszGroup; auto *parent = node->Parent()->ToElement(); while (mir_strcmpi(parent->Name(), "body")) { @@ -566,7 +566,8 @@ void CImportFeed::OnOk(CCtrlBase*) Proto_AddToContact(hContact, MODULENAME); g_plugin.setWString(hContact, "Nick", text); g_plugin.setWString(hContact, "URL", url); - g_plugin.setWString(hContact, "Homepage", siteurl); + if (siteurl) + g_plugin.setWString(hContact, "Homepage", siteurl); g_plugin.setByte(hContact, "CheckState", 1); g_plugin.setDword(hContact, "UpdateTime", DEFAULT_UPDATE_TIME); g_plugin.setWString(hContact, "MsgFormat", TAGSDEFAULT); -- cgit v1.2.3