diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-03-29 11:04:33 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-03-29 11:04:33 -0400 |
| commit | 87bf3bbb8fca91d254b5e9eab4a143cf96af4cac (patch) | |
| tree | ad57f82b8b987a4f7853f4dd9390a5c04a520af9 /MediaBrowser.Server.Implementations | |
| parent | 578dec0c71361be17eed68f82f20840807a9c9f4 (diff) | |
add device null check
Diffstat (limited to 'MediaBrowser.Server.Implementations')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Session/SessionManager.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/Session/SessionManager.cs b/MediaBrowser.Server.Implementations/Session/SessionManager.cs index 201e86fe2..ec93ae876 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; |
