From a679f1a6a17108fdd5692d91f49990350f252c84 Mon Sep 17 00:00:00 2001 From: Drewster727 Date: Thu, 26 May 2016 10:57:30 -0500 Subject: [PATCH] fix null exception possibility in cp/sickrage cacher classes --- PlexRequests.Services/Jobs/CouchPotatoCacher.cs | 2 +- PlexRequests.Services/Jobs/SickRageCacher.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PlexRequests.Services/Jobs/CouchPotatoCacher.cs b/PlexRequests.Services/Jobs/CouchPotatoCacher.cs index 6b905a9b3..3fb831b12 100644 --- a/PlexRequests.Services/Jobs/CouchPotatoCacher.cs +++ b/PlexRequests.Services/Jobs/CouchPotatoCacher.cs @@ -87,7 +87,7 @@ namespace PlexRequests.Services.Jobs public int[] QueuedIds() { var movies = Cache.Get(CacheKeys.CouchPotatoQueued); - return movies?.movies.Select(x => x.info.tmdb_id).ToArray() ?? new int[] { }; + return movies?.movies?.Select(x => x.info.tmdb_id).ToArray() ?? new int[] { }; } public void Execute(IJobExecutionContext context) diff --git a/PlexRequests.Services/Jobs/SickRageCacher.cs b/PlexRequests.Services/Jobs/SickRageCacher.cs index 69b50b358..cece5100d 100644 --- a/PlexRequests.Services/Jobs/SickRageCacher.cs +++ b/PlexRequests.Services/Jobs/SickRageCacher.cs @@ -87,7 +87,7 @@ namespace PlexRequests.Services.Jobs public int[] QueuedIds() { var tv = Cache.Get(CacheKeys.SickRageQueued); - return tv?.data.Values.Select(x => x.tvdbid).ToArray() ?? new int[] { }; + return tv?.data?.Values.Select(x => x.tvdbid).ToArray() ?? new int[] { }; } public void Execute(IJobExecutionContext context)