mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-03 19:17:24 -05:00 
			
		
		
		
	Merge pull request #4378 from barronpm/fix-nullref
Fix possible null reference exception
This commit is contained in:
		
						commit
						e37805e82e
					
				@ -432,7 +432,7 @@ namespace Jellyfin.Server.Implementations.Users
 | 
				
			|||||||
                    // the authentication provider might have created it
 | 
					                    // the authentication provider might have created it
 | 
				
			||||||
                    user = Users.FirstOrDefault(i => string.Equals(username, i.Username, StringComparison.OrdinalIgnoreCase));
 | 
					                    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());
 | 
					                        UpdatePolicy(user.Id, hasNewUserPolicy.GetNewUserPolicy());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user