diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-04-28 23:56:20 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-04-28 23:56:20 -0400 |
| commit | e9fb806478e974b200b54f8acff5eb09bdef4c32 (patch) | |
| tree | 6b83c4728d93eb4bc26331d946f500243f5a1f24 /MediaBrowser.Server.Implementations/Session/SessionManager.cs | |
| parent | 0f4c28c120751e1cf6e0562ef0445c7fa46cf0a4 (diff) | |
3.0.5231.40980
Diffstat (limited to 'MediaBrowser.Server.Implementations/Session/SessionManager.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Session/SessionManager.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/Session/SessionManager.cs b/MediaBrowser.Server.Implementations/Session/SessionManager.cs index 30d9976f0..b0e31a50c 100644 --- a/MediaBrowser.Server.Implementations/Session/SessionManager.cs +++ b/MediaBrowser.Server.Implementations/Session/SessionManager.cs @@ -264,7 +264,7 @@ namespace MediaBrowser.Server.Implementations.Session /// <param name="libraryItem">The library item.</param> private void UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem) { - var runtimeTicks = libraryItem.RunTimeTicks; + var runtimeTicks = libraryItem == null ? null : libraryItem.RunTimeTicks; if (string.IsNullOrWhiteSpace(info.MediaSourceId)) { @@ -277,7 +277,7 @@ namespace MediaBrowser.Server.Implementations.Session runtimeTicks = _libraryManager.GetItemById(new Guid(info.MediaSourceId)).RunTimeTicks; } - if (!string.IsNullOrWhiteSpace(info.ItemId)) + if (!string.IsNullOrWhiteSpace(info.ItemId) && libraryItem != null) { info.Item = GetItemInfo(libraryItem, runtimeTicks); } |
