aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Playback/BaseStreamingService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api/Playback/BaseStreamingService.cs')
-rw-r--r--MediaBrowser.Api/Playback/BaseStreamingService.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index 9f7c1a6c4..89d50e9a3 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -1065,8 +1065,12 @@ namespace MediaBrowser.Api.Playback
/// <returns>System.String.</returns>
private string GetUserAgentParam(StreamState state)
{
- string useragent;
- state.RemoteHttpHeaders.TryGetValue("User-Agent", out useragent);
+ string useragent = null;
+
+ if (state.RemoteHttpHeaders != null)
+ {
+ state.RemoteHttpHeaders.TryGetValue("User-Agent", out useragent);
+ }
if (string.IsNullOrWhiteSpace(useragent))
{