Browse Source

Merge pull request #4575 from crobibero/null-ref

Don't throw null reference if ContentType is null.
Claus Vium 4 years ago
parent
commit
e86385b74d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Emby.Server.Implementations/LiveTv/TunerHosts/SharedHttpStream.cs

+ 1 - 1
Emby.Server.Implementations/LiveTv/TunerHosts/SharedHttpStream.cs

@@ -63,7 +63,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
             var extension = "ts";
             var requiresRemux = false;
 
-            var contentType = response.Content.Headers.ContentType.ToString();
+            var contentType = response.Content.Headers.ContentType?.ToString() ?? string.Empty;
             if (contentType.IndexOf("matroska", StringComparison.OrdinalIgnoreCase) != -1)
             {
                 requiresRemux = true;