Merge pull request #4533 from Bond-009/nullref3

Fix nullref
This commit is contained in:
Claus Vium 2020-11-21 14:14:12 +01:00 committed by GitHub
commit 937e2a84e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -928,7 +928,7 @@ namespace Jellyfin.Api.Controllers
[FromRoute] int? imageIndex = null) [FromRoute] int? imageIndex = null)
{ {
var user = _userManager.GetUserById(userId); var user = _userManager.GetUserById(userId);
if (user == null) if (user?.ProfileImage == null)
{ {
return NotFound(); return NotFound();
} }