diff options
| author | Patrick Barron <barronpm@gmail.com> | 2020-10-29 19:16:39 -0400 |
|---|---|---|
| committer | Patrick Barron <barronpm@gmail.com> | 2020-10-29 19:16:39 -0400 |
| commit | d887e424052e3f57b7578d9dc7f62bcd8085fcbe (patch) | |
| tree | 6d00b5254ded923ec33889651cbdf1b11d0e9802 | |
| parent | e0045457f900b69530e6d87522d9c4769e2cf01b (diff) | |
Fix possible NullReferenceException
| -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 437833aa3..5f25c7737 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 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()); |
