diff options
author | Mataes <mataes2007@gmail.com> | 2020-04-22 14:36:54 +0300 |
---|---|---|
committer | Mataes <mataes2007@gmail.com> | 2020-04-22 14:36:54 +0300 |
commit | 971beea1813007a0cb71127ff739be665d9854e4 (patch) | |
tree | 585c9de846189f5dea6648d395ccc47589247b6a | |
parent | d752ffd9ed1a88a1ac4cedd2631f7e77d725d815 (diff) |
newsaggregator: fixed import from files without htmlUrl tag
-rw-r--r-- | protocols/NewsAggregator/Src/Options.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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); |