From f52245fba7f9c26e87df576fe589335295586616 Mon Sep 17 00:00:00 2001 From: Erik Darling <2136037+erikdarlingdata@users.noreply.github.com> Date: Fri, 6 Mar 2026 18:10:03 -0600 Subject: [PATCH] Fix nullable dereference in Lite anomalous job alert MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit worst.PercentOfAverage is double? — casting directly to (double) would throw InvalidOperationException if null. Added ?? 0 fallback. Co-Authored-By: Claude Opus 4.6 --- Lite/MainWindow.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lite/MainWindow.xaml.cs b/Lite/MainWindow.xaml.cs index 8c6e4ec..48490ba 100644 --- a/Lite/MainWindow.xaml.cs +++ b/Lite/MainWindow.xaml.cs @@ -1291,7 +1291,7 @@ await _emailAlertService.TrySendAlertEmailAsync( $"{App.AlertLongRunningJobMultiplier}x historical avg", summary.ServerId, jobContext, - numericCurrentValue: (double)worst.PercentOfAverage, + numericCurrentValue: (double)(worst.PercentOfAverage ?? 0), numericThresholdValue: App.AlertLongRunningJobMultiplier * 100); } }