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

This commit is contained in:
LogicalPhallacy 2022-08-11 14:12:27 -07:00 committed by cvium
parent de196a7687
commit 2920c52d61
1 changed files with 3 additions and 1 deletions

View File

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