From 2920c52d61225d077c031be6abe52670f984d6ef Mon Sep 17 00:00:00 2001 From: LogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com> Date: Thu, 11 Aug 2022 14:12:27 -0700 Subject: [PATCH] Reorder and check for query user null to avoid null ref issues --- Emby.Server.Implementations/Library/LibraryManager.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index 1c1f774375..12455e71ed 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/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(); }