The Free Software Media System - Server Backend & API
Fix possible NullReferenceException
Patrick Barrond887e424052e
diff --git a/Jellyfin.Server.Implementations/Users/UserManager.cs b/Jellyfin.Server.Implementations/Users/UserManager.csindex 437833aa38..5f25c7737a 100644--- a/Jellyfin.Server.Implementations/Users/UserManager.cs+++ b/Jellyfin.Server.Implementations/Users/UserManager.cs@@ -460,7 +460,7 @@ namespace Jellyfin.Server.Implementations.Users// the authentication provider might have created ituser = Users.FirstOrDefault(i => string.Equals(username, i.Username, StringComparison.OrdinalIgnoreCase));- if (authenticationProvider is IHasNewUserPolicy hasNewUserPolicy)+ if (authenticationProvider is IHasNewUserPolicy hasNewUserPolicy && user != null){UpdatePolicy(user.Id, hasNewUserPolicy.GetNewUserPolicy());