From 342f63a625366dad7ad4df0d47a35ca6160006ee Mon Sep 17 00:00:00 2001 From: rockstardev Date: Sun, 14 Jun 2020 23:26:57 -0500 Subject: [PATCH] Directly casting to NotificationEvent, evading null case --- BTCPayServer/HostedServices/NotificationDbSaver.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BTCPayServer/HostedServices/NotificationDbSaver.cs b/BTCPayServer/HostedServices/NotificationDbSaver.cs index 49c716e4c..4eb76ad97 100644 --- a/BTCPayServer/HostedServices/NotificationDbSaver.cs +++ b/BTCPayServer/HostedServices/NotificationDbSaver.cs @@ -30,7 +30,7 @@ namespace BTCPayServer.HostedServices protected override async Task ProcessEvent(object evt, CancellationToken cancellationToken) { - var casted = evt as NotificationEvent; + var casted = (NotificationEvent)evt; using (var db = _ContextFactory.CreateContext()) { foreach (var uid in casted.ApplicationUserIds)