Fixed null server handling for the malware result event

This commit is contained in:
Marcel Baumgartner
2023-08-29 15:11:42 +02:00
parent a372c756e4
commit ea19105006

View File

@@ -110,10 +110,13 @@
{
await Event.On<Object>("malwareScan.status", this, async o => { await InvokeAsync(StateHasChanged); });
await Event.On<Server>("malwareScan.result", this, async server =>
await Event.On<Server?>("malwareScan.result", this, async server =>
{
lock (MalwareBackgroundScanService.ScanResults)
{
if (server == null)
return;
ScanResults.Add(server, MalwareBackgroundScanService.ScanResults[server]);
}