浏览代码

Reorder and check for query user null to avoid null ref issues

LogicalPhallacy 2 年之前
父节点
当前提交
2920c52d61
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      Emby.Server.Implementations/Library/LibraryManager.cs

+ 3 - 1
Emby.Server.Implementations/Library/LibraryManager.cs

@@ -2779,8 +2779,10 @@ namespace Emby.Server.Implementations.Library
                     return null;
                 }
             })
-            .Where(i => i.IsVisible(query.User))
             .Where(i => i != null)
+            .Where(i => query.User == null ? 
+                true :
+                i.IsVisible(query.User))
             .ToList();
         }