From 4902d93583c58bd55149b22f53681fde9460a11f Mon Sep 17 00:00:00 2001 From: Lucas Hardt Date: Wed, 24 Sep 2025 19:47:03 +0200 Subject: [PATCH] fix issue, when resize fails --- Controllers/ShopImageController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Controllers/ShopImageController.cs b/Controllers/ShopImageController.cs index 4ff190f..8cd7940 100644 --- a/Controllers/ShopImageController.cs +++ b/Controllers/ShopImageController.cs @@ -627,7 +627,8 @@ private async Task GenerateItemCard(ShopEntry shopEntry) } using var resizedImageBitmap = - shopEntry.Image.Resize(new SKImageInfo(resizeWidth, resizeHeight), SKSamplingOptions.Default); + shopEntry.Image.Resize(new SKImageInfo(resizeWidth, resizeHeight), SKSamplingOptions.Default) ?? + shopEntry.Image; // Car bundles get centered in the middle of the card vertically if (shopEntry.ImageType == "car-bundle")