From fee106abeffc911a4a69896fc28f317f4168dfcd Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Sat, 19 Oct 2019 13:50:52 +0900 Subject: [PATCH] Remove possible NRE when app start --- BTCPayServer/HostedServices/CssThemeManager.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/BTCPayServer/HostedServices/CssThemeManager.cs b/BTCPayServer/HostedServices/CssThemeManager.cs index 392305395..51aa391dc 100644 --- a/BTCPayServer/HostedServices/CssThemeManager.cs +++ b/BTCPayServer/HostedServices/CssThemeManager.cs @@ -52,7 +52,7 @@ namespace BTCPayServer.HostedServices public AppType? RootAppType { get; set; } public string RootAppId { get; set; } - public List DomainToAppMapping { get; set; } + public List DomainToAppMapping { get; set; } = new List(); internal void Update(PoliciesSettings data) { @@ -117,7 +117,6 @@ namespace BTCPayServer.HostedServices async Task ListenForPoliciesChanges() { - await new SynchronizationContextRemover(); var data = (await _SettingsRepository.GetSettingAsync()) ?? new PoliciesSettings(); _CssThemeManager.Update(data); await _SettingsRepository.WaitSettingsChanged(Cancellation); @@ -125,7 +124,6 @@ namespace BTCPayServer.HostedServices async Task ListenForThemeChanges() { - await new SynchronizationContextRemover(); var data = (await _SettingsRepository.GetSettingAsync()) ?? new ThemeSettings(); _CssThemeManager.Update(data);