From 87bf3bbb8fca91d254b5e9eab4a143cf96af4cac Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 29 Mar 2015 11:04:33 -0400 Subject: [PATCH] add device null check --- .../Session/SessionManager.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Server.Implementations/Session/SessionManager.cs b/MediaBrowser.Server.Implementations/Session/SessionManager.cs index 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.Session device = 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;