aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/HlsSegmentController.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-11-13 09:04:31 -0700
committercrobibero <cody@robibe.ro>2020-11-13 09:04:31 -0700
commit01355e049855a21b69e7e258599c3fa35965375a (patch)
tree3335a82c2fb40203ccdea697e00a0cafd3dc4ed3 /Jellyfin.Api/Controllers/HlsSegmentController.cs
parente8675a6c24ebb86ce4a48f208f439f42267bf8e6 (diff)
Fix nullability errors in Jellyfin.Api (part 1)
Diffstat (limited to 'Jellyfin.Api/Controllers/HlsSegmentController.cs')
-rw-r--r--Jellyfin.Api/Controllers/HlsSegmentController.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Jellyfin.Api/Controllers/HlsSegmentController.cs b/Jellyfin.Api/Controllers/HlsSegmentController.cs
index 054e586ce..2cee0e9ef 100644
--- a/Jellyfin.Api/Controllers/HlsSegmentController.cs
+++ b/Jellyfin.Api/Controllers/HlsSegmentController.cs
@@ -136,6 +136,11 @@ namespace Jellyfin.Api.Controllers
string.Equals(Path.GetExtension(i), ".m3u8", StringComparison.OrdinalIgnoreCase)
&& i.IndexOf(normalizedPlaylistId, StringComparison.OrdinalIgnoreCase) != -1);
+ if (playlistPath == null)
+ {
+ throw new NullReferenceException(nameof(playlistPath));
+ }
+
return GetFileResult(file, playlistPath);
}