Browse Source

Fixed possible NullReferenceException in SessionManager (#12915)

JPVenson 7 tháng trước cách đây
mục cha
commit
3592c629e7
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      Emby.Server.Implementations/Session/SessionManager.cs

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

@@ -1938,7 +1938,11 @@ namespace Emby.Server.Implementations.Session
                 // Don't report acceleration type for non-admin users.
                 result = result.Select(r =>
                 {
-                    r.TranscodingInfo.HardwareAccelerationType = HardwareAccelerationType.none;
+                    if (r.TranscodingInfo is not null)
+                    {
+                        r.TranscodingInfo.HardwareAccelerationType = HardwareAccelerationType.none;
+                    }
+
                     return r;
                 });
             }