diff options
| author | Bond-009 <bond.009@outlook.com> | 2020-10-30 00:34:28 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-30 00:34:28 +0100 |
| commit | e37805e82e734a0531f2809eec6440096f5550b5 (patch) | |
| tree | 363c68d414927082fe8dbadc3741df91b89b9fe6 | |
| parent | 2c6b31fc7bf45808ca041e9e76046495b7d351d6 (diff) | |
| parent | d887e424052e3f57b7578d9dc7f62bcd8085fcbe (diff) | |
Merge pull request #4378 from barronpm/fix-nullref
Fix possible null reference exception
| -rw-r--r-- | Jellyfin.Server.Implementations/Users/UserManager.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Jellyfin.Server.Implementations/Users/UserManager.cs b/Jellyfin.Server.Implementations/Users/UserManager.cs index b39333b5c..b41a5ee5c 100644 --- a/Jellyfin.Server.Implementations/Users/UserManager.cs +++ b/Jellyfin.Server.Implementations/Users/UserManager.cs @@ -432,7 +432,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()); |
