The Free Software Media System - Server Backend & API
add device null check
Luke Pulverenti87bf3bbb8fca
diff --git a/MediaBrowser.Server.Implementations/Session/SessionManager.cs b/MediaBrowser.Server.Implementations/Session/SessionManager.csindex 201e86fe2f..ec93ae8766 100644--- a/MediaBrowser.Server.Implementations/Session/SessionManager.cs+++ b/MediaBrowser.Server.Implementations/Session/SessionManager.cs@@ -432,9 +432,12 @@ namespace MediaBrowser.Server.Implementations.Sessiondevice = device ?? _deviceManager.GetDevice(deviceId);- if (!string.IsNullOrEmpty(device.CustomName))+ if (device != null){- deviceName = device.CustomName;+ if (!string.IsNullOrEmpty(device.CustomName))+ {+ deviceName = device.CustomName;+ }}sessionInfo.DeviceName = deviceName;