Fixed null server handling for the malware result event
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user