From 143ec7463f0c6b566123f0e8f8bc47d4d5dd3eaa Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Mon, 26 Sep 2022 22:00:24 +0900 Subject: [PATCH] Fix crash on migration from old install (Fix #4162) --- BTCPayServer/Data/StoreDataExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BTCPayServer/Data/StoreDataExtensions.cs b/BTCPayServer/Data/StoreDataExtensions.cs index 967ee1874..137ee15ed 100644 --- a/BTCPayServer/Data/StoreDataExtensions.cs +++ b/BTCPayServer/Data/StoreDataExtensions.cs @@ -52,7 +52,7 @@ namespace BTCPayServer.Data result.PreferredExchange = CoinGeckoRateProvider.CoinGeckoName; if (result.PaymentMethodCriteria is null) result.PaymentMethodCriteria = new List(); - result.PaymentMethodCriteria.RemoveAll(criteria => criteria.PaymentMethod is null); + result.PaymentMethodCriteria.RemoveAll(criteria => criteria?.PaymentMethod is null); return result; }