aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Library/LibraryService.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-07-08 14:11:13 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-07-08 14:11:13 -0400
commit671a5126996e454125abb16cee56607bdd94be9f (patch)
treef2e109e3d39fbe6139489c405eb2c8879c82cb37 /MediaBrowser.Api/Library/LibraryService.cs
parente9885887453dae7a38c4a5a0b0f40c680907547b (diff)
add null checks to get theme media
Diffstat (limited to 'MediaBrowser.Api/Library/LibraryService.cs')
-rw-r--r--MediaBrowser.Api/Library/LibraryService.cs2
1 files changed, 2 insertions, 0 deletions
diff --git a/MediaBrowser.Api/Library/LibraryService.cs b/MediaBrowser.Api/Library/LibraryService.cs
index 4cd6a66ef..1949dea12 100644
--- a/MediaBrowser.Api/Library/LibraryService.cs
+++ b/MediaBrowser.Api/Library/LibraryService.cs
@@ -839,6 +839,7 @@ namespace MediaBrowser.Api.Library
var dtoOptions = GetDtoOptions(request);
var dtos = GetThemeSongIds(item).Select(_libraryManager.GetItemById)
+ .Where(i => i != null)
.OrderBy(i => i.SortName)
.Select(i => _dtoService.GetBaseItemDto(i, dtoOptions, user, item));
@@ -882,6 +883,7 @@ namespace MediaBrowser.Api.Library
var dtoOptions = GetDtoOptions(request);
var dtos = GetThemeVideoIds(item).Select(_libraryManager.GetItemById)
+ .Where(i => i != null)
.OrderBy(i => i.SortName)
.Select(i => _dtoService.GetBaseItemDto(i, dtoOptions, user, item));