From 23cceec6f90b04d5572e3e0113cd5029ebb80e46 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Wed, 23 Oct 2019 08:50:46 +0100 Subject: [PATCH] Fixed potential null ref !wip --- src/Ombi.Schedule/Jobs/Ombi/NewsletterJob.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Ombi.Schedule/Jobs/Ombi/NewsletterJob.cs b/src/Ombi.Schedule/Jobs/Ombi/NewsletterJob.cs index f6d61b30d..585ed42bb 100644 --- a/src/Ombi.Schedule/Jobs/Ombi/NewsletterJob.cs +++ b/src/Ombi.Schedule/Jobs/Ombi/NewsletterJob.cs @@ -715,7 +715,7 @@ namespace Ombi.Schedule.Jobs.Ombi { SeasonNumber = key, Episodes = g.ToList(), - EpisodeAirDate = tvInfo.seasons.Where(x => x.season_number == key).Select(x => x.air_date) + EpisodeAirDate = tvInfo?.seasons?.Where(x => x.season_number == key)?.Select(x => x.air_date) ?? new List() } ); @@ -840,7 +840,7 @@ namespace Ombi.Schedule.Jobs.Ombi { SeasonNumber = key, Episodes = g.ToList(), - EpisodeAirDate = tvInfo.seasons.Where(x => x.season_number == key).Select(x => x.air_date) + EpisodeAirDate = tvInfo?.seasons?.Where(x => x.season_number == key)?.Select(x => x.air_date) ?? new List() } );