From 0ef9d28a73cdbc7e7f50371ec2f6944ed355d2ba Mon Sep 17 00:00:00 2001 From: Qstick Date: Sun, 16 Aug 2020 01:14:47 -0400 Subject: [PATCH] Fixed: Possible nullRef when setting IndexerFlags in TorznabParser --- src/NzbDrone.Core/Indexers/Torznab/TorznabRssParser.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/NzbDrone.Core/Indexers/Torznab/TorznabRssParser.cs b/src/NzbDrone.Core/Indexers/Torznab/TorznabRssParser.cs index 7ea6839d7..f93eae9c5 100644 --- a/src/NzbDrone.Core/Indexers/Torznab/TorznabRssParser.cs +++ b/src/NzbDrone.Core/Indexers/Torznab/TorznabRssParser.cs @@ -51,15 +51,16 @@ protected override bool PreProcess(IndexerResponse indexerResponse) protected override ReleaseInfo ProcessItem(XElement item, ReleaseInfo releaseInfo) { var torrentInfo = base.ProcessItem(item, releaseInfo) as TorrentInfo; - if (GetImdbId(item) != null) + + if (torrentInfo != null) { - if (torrentInfo != null) + if (GetImdbId(item) != null) { torrentInfo.ImdbId = int.Parse(GetImdbId(item).Substring(2)); } - } - torrentInfo.IndexerFlags = GetFlags(item); + torrentInfo.IndexerFlags = GetFlags(item); + } return torrentInfo; }