From 850c26dc13554c68942135a04db09f4fa3f07650 Mon Sep 17 00:00:00 2001 From: d11n Date: Mon, 21 Nov 2022 22:07:46 +0100 Subject: [PATCH] POS: Fix null pointer Introduced in #4307, the referenced object needs to be `itemChoice` instead of `choice`. --- .../PointOfSale/Controllers/UIPointOfSaleController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BTCPayServer/Plugins/PointOfSale/Controllers/UIPointOfSaleController.cs b/BTCPayServer/Plugins/PointOfSale/Controllers/UIPointOfSaleController.cs index 808e670ab..45e50e76e 100644 --- a/BTCPayServer/Plugins/PointOfSale/Controllers/UIPointOfSaleController.cs +++ b/BTCPayServer/Plugins/PointOfSale/Controllers/UIPointOfSaleController.cs @@ -200,9 +200,9 @@ namespace BTCPayServer.Plugins.PointOfSale.Controllers } decimal expectedCartItemPrice = 0; - if (choice.Price.Type != ViewPointOfSaleViewModel.Item.ItemPrice.ItemPriceType.Topup) + if (itemChoice.Price.Type != ViewPointOfSaleViewModel.Item.ItemPrice.ItemPriceType.Topup) { - expectedCartItemPrice = choice.Price.Value ?? 0; + expectedCartItemPrice = itemChoice.Price.Value ?? 0; } expectedMinimumAmount += expectedCartItemPrice * cartItem.Value;