Merge pull request #4861 from crobibero/null-ref

Fix null reference when logging

(cherry picked from commit 93b754c366)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
pull/5296/head
Joshua M. Boniface 4 years ago
parent 03c8216946
commit 124ab090bc

@ -1033,9 +1033,9 @@ namespace MediaBrowser.Model.Dlna
{ {
_logger.LogInformation( _logger.LogInformation(
"Profile: {0}, No video direct play profiles found for {1} with codec {2}", "Profile: {0}, No video direct play profiles found for {1} with codec {2}",
profile.Name ?? "Unknown Profile", profile?.Name ?? "Unknown Profile",
mediaSource.Path ?? "Unknown path", mediaSource?.Path ?? "Unknown path",
videoStream.Codec ?? "Unknown codec"); videoStream?.Codec ?? "Unknown codec");
return (null, GetTranscodeReasonsFromDirectPlayProfile(mediaSource, videoStream, audioStream, profile.DirectPlayProfiles)); return (null, GetTranscodeReasonsFromDirectPlayProfile(mediaSource, videoStream, audioStream, profile.DirectPlayProfiles));
} }

Loading…
Cancel
Save