mirror of https://github.com/jellyfin/jellyfin.git
add device null check
This commit is contained in:
parent
578dec0c71
commit
87bf3bbb8f
|
@ -432,10 +432,13 @@ namespace MediaBrowser.Server.Implementations.Session
|
||||||
|
|
||||||
device = device ?? _deviceManager.GetDevice(deviceId);
|
device = device ?? _deviceManager.GetDevice(deviceId);
|
||||||
|
|
||||||
|
if (device != null)
|
||||||
|
{
|
||||||
if (!string.IsNullOrEmpty(device.CustomName))
|
if (!string.IsNullOrEmpty(device.CustomName))
|
||||||
{
|
{
|
||||||
deviceName = device.CustomName;
|
deviceName = device.CustomName;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sessionInfo.DeviceName = deviceName;
|
sessionInfo.DeviceName = deviceName;
|
||||||
sessionInfo.UserId = userId;
|
sessionInfo.UserId = userId;
|
||||||
|
|
Loading…
Reference in New Issue