From ea1910500624b4dc849a73de037371895a8c7559 Mon Sep 17 00:00:00 2001 From: Marcel Baumgartner Date: Tue, 29 Aug 2023 15:11:42 +0200 Subject: [PATCH] Fixed null server handling for the malware result event --- Moonlight/Shared/Views/Admin/Security/Malware.razor | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Moonlight/Shared/Views/Admin/Security/Malware.razor b/Moonlight/Shared/Views/Admin/Security/Malware.razor index 75effd28..a5f81d84 100644 --- a/Moonlight/Shared/Views/Admin/Security/Malware.razor +++ b/Moonlight/Shared/Views/Admin/Security/Malware.razor @@ -110,10 +110,13 @@ { await Event.On("malwareScan.status", this, async o => { await InvokeAsync(StateHasChanged); }); - await Event.On("malwareScan.result", this, async server => + await Event.On("malwareScan.result", this, async server => { lock (MalwareBackgroundScanService.ScanResults) { + if (server == null) + return; + ScanResults.Add(server, MalwareBackgroundScanService.ScanResults[server]); }