Don't throw null reference if ContentType is null.

This commit is contained in:
crobibero 2020-11-24 16:42:27 -07:00
parent 02c1879533
commit 0acea5b077

View file

@ -63,7 +63,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
var extension = "ts"; var extension = "ts";
var requiresRemux = false; 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) if (contentType.IndexOf("matroska", StringComparison.OrdinalIgnoreCase) != -1)
{ {
requiresRemux = true; requiresRemux = true;