From 8626eded8d987e7eb306d0ec0f17adf83f26b3ae Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 22 Oct 2016 10:51:19 -0400 Subject: [PATCH] add null check to omdb --- MediaBrowser.Providers/Omdb/OmdbProvider.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Providers/Omdb/OmdbProvider.cs b/MediaBrowser.Providers/Omdb/OmdbProvider.cs index 8fb4d8fccf..9c7a16fab8 100644 --- a/MediaBrowser.Providers/Omdb/OmdbProvider.cs +++ b/MediaBrowser.Providers/Omdb/OmdbProvider.cs @@ -124,7 +124,12 @@ namespace MediaBrowser.Providers.Omdb T item = itemResult.Item; - var seasonResult = await GetSeasonRootObject(imdbId, seasonNumber, cancellationToken); + var seasonResult = await GetSeasonRootObject(imdbId, seasonNumber, cancellationToken).ConfigureAwait(false); + + if (seasonResult == null) + { + return false; + } RootObject result = null; @@ -142,7 +147,6 @@ namespace MediaBrowser.Providers.Omdb return false; } - // Only take the name and rating if the user's language is set to english, since Omdb has no localization if (string.Equals(language, "en", StringComparison.OrdinalIgnoreCase)) {