Skip to content

Commit

Permalink
Fix null exception
Browse files Browse the repository at this point in the history
  • Loading branch information
CorruptComputer committed Feb 4, 2024
1 parent 7d8c59c commit 6d3b666
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion UnitystationLauncher/Services/InstallationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ void ScanLogs(ScanLog log)

StringBuilder sb = new();
sb.AppendLine($"Security scan failed for: {download.ForkName} {download.BuildVersion}");
sb.AppendLine(scanLogs.Last(l => l.LogMessage.Contains("Total violations")).LogMessage);
sb.AppendLine(scanLogs.LastOrDefault(l => l.LogMessage.Contains("Total violations"))?.LogMessage ?? string.Empty);
sb.AppendLine($"Scan log written to: {filePath}");
sb.AppendLine("Please report this issue to the fork developers.");

Expand Down

0 comments on commit 6d3b666

Please sign in to comment.