From 05b01a13c8ea74bd508db64438e77c25408c3f7f Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Mon, 24 Jul 2023 23:20:17 +0900 Subject: [PATCH] Fix NRE error in PoS report --- BTCPayServer/Services/Reporting/ProductsReportProvider.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BTCPayServer/Services/Reporting/ProductsReportProvider.cs b/BTCPayServer/Services/Reporting/ProductsReportProvider.cs index 72988b180..ed16f123a 100644 --- a/BTCPayServer/Services/Reporting/ProductsReportProvider.cs +++ b/BTCPayServer/Services/Reporting/ProductsReportProvider.cs @@ -78,8 +78,8 @@ public class ProductsReportProvider : ReportProvider } else { - var posData = i.Metadata.PosData?.ToObject(); - if (posData.Cart is { } cart) + var posData = i.Metadata?.PosData?.ToObject(); + if (posData?.Cart is { } cart) { foreach (var item in cart) {