Skip to content

The Free Software Media System - Server Backend & API

Fix nullref

Bond_009c01042b35560
diff --git a/Jellyfin.Api/Controllers/ImageController.cs b/Jellyfin.Api/Controllers/ImageController.cs
index 76e53b9a53..366f701632 100644
--- a/Jellyfin.Api/Controllers/ImageController.cs
+++ b/Jellyfin.Api/Controllers/ImageController.cs
@@ -928,7 +928,7 @@ namespace Jellyfin.Api.Controllers
[FromRoute] int? imageIndex = null)
{
var user = _userManager.GetUserById(userId);
- if (user == null)
+ if (user?.ProfileImage == null)
{
return NotFound();
}