浏览代码

Correctly handle devices without custom names

Patrick Barron 4 年之前
父节点
当前提交
373155a063
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Emby.Server.Implementations/Session/SessionManager.cs

+ 1 - 1
Emby.Server.Implementations/Session/SessionManager.cs

@@ -532,7 +532,7 @@ namespace Emby.Server.Implementations.Session
             }
             }
 
 
             var deviceOptions = await _deviceManager.GetDeviceOptions(deviceId).ConfigureAwait(false);
             var deviceOptions = await _deviceManager.GetDeviceOptions(deviceId).ConfigureAwait(false);
-            if (string.IsNullOrEmpty(deviceOptions.CustomName))
+            if (string.IsNullOrEmpty(deviceOptions?.CustomName))
             {
             {
                 sessionInfo.DeviceName = deviceName;
                 sessionInfo.DeviceName = deviceName;
             }
             }