Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Commit

Permalink
fix - Fixed NullReferenceException trying to parse some ...
Browse files Browse the repository at this point in the history
...feeds

Fixed Syndian crashing with NRE when trying to parse some feeds

---

When some feeds are parsed, Syndian must no longer crash with NullReferenceException. Currently, this crash affected some feeds, like CNN.

---

Type: fix
Breaking: False
Doc Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Jul 15, 2023
1 parent 138fb8b commit 3771237
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Syndian/Instance/RSSArticle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ public Dictionary<string, XmlNode> ArticleVariables
/// <param name="ArticleVariables">Article variables as <see cref="XmlNode"/>s</param>
internal RSSArticle(string ArticleTitle, string ArticleLink, string ArticleDescription, Dictionary<string, XmlNode> ArticleVariables)
{
articleTitle = ArticleTitle.Trim();
articleLink = ArticleLink.Trim();
articleDescription = ArticleDescription.Trim();
articleTitle = !string.IsNullOrWhiteSpace(ArticleTitle) ? ArticleTitle.Trim() : "";
articleLink = !string.IsNullOrWhiteSpace(ArticleLink) ? ArticleLink.Trim() : "";
articleDescription = !string.IsNullOrWhiteSpace(ArticleDescription) ? ArticleDescription.Trim() : "";
articleVariables = ArticleVariables;
}

Expand Down

0 comments on commit 3771237

Please sign in to comment.