From 371092cf62f423fe62eb72f6c3d450966dc49b7d Mon Sep 17 00:00:00 2001 From: MrTimscampi Date: Tue, 1 Dec 2020 19:33:18 +0100 Subject: [PATCH] Fix possible nullref --- Emby.Server.Implementations/TV/TVSeriesManager.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Emby.Server.Implementations/TV/TVSeriesManager.cs b/Emby.Server.Implementations/TV/TVSeriesManager.cs index 35fc12d554..4dff8e252d 100644 --- a/Emby.Server.Implementations/TV/TVSeriesManager.cs +++ b/Emby.Server.Implementations/TV/TVSeriesManager.cs @@ -206,11 +206,13 @@ namespace Emby.Server.Implementations.TV DtoOptions = dtoOptions }).Cast().FirstOrDefault(); - var userData = _userDataManager.GetUserData(user, nextEpisode); + if (!(nextEpisode is null)) { + var userData = _userDataManager.GetUserData(user, nextEpisode); - if (userData.PlaybackPositionTicks > 0) - { - return null; + if (userData.PlaybackPositionTicks > 0) + { + return null; + } } return nextEpisode;