Sfoglia il codice sorgente

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

LogicalPhallacy 2 anni fa
parent
commit
2920c52d61
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  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();
         }