mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-02 08:23:04 +00:00
Fix possible NullReferenceException
This commit is contained in:
@@ -460,7 +460,7 @@ namespace Jellyfin.Server.Implementations.Users
|
||||
// the authentication provider might have created it
|
||||
user = 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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user