Prevent NullRef on CustomFormat parse

This commit is contained in:
Qstick 2022-11-28 22:04:33 -06:00
parent f2b2eb69a3
commit 528feb14c9
1 changed files with 5 additions and 1 deletions

View File

@ -94,7 +94,11 @@ namespace NzbDrone.Core.CustomFormats
public List<CustomFormat> ParseCustomFormat(ParsedEpisodeInfo episodeInfo, Series series) public List<CustomFormat> ParseCustomFormat(ParsedEpisodeInfo episodeInfo, Series series)
{ {
episodeInfo.ExtraInfo["OriginalLanguage"] = series.OriginalLanguage; if (series?.OriginalLanguage != null)
{
episodeInfo.ExtraInfo["OriginalLanguage"] = series.OriginalLanguage;
}
return ParseCustomFormat(episodeInfo, _formatService.All()); return ParseCustomFormat(episodeInfo, _formatService.All());
} }