Skip to content

Fix nullable dereference in Lite anomalous job alert#458

Merged
erikdarlingdata merged 1 commit intodevfrom
fix/nullable-percent-of-average
Mar 7, 2026
Merged

Fix nullable dereference in Lite anomalous job alert#458
erikdarlingdata merged 1 commit intodevfrom
fix/nullable-percent-of-average

Conversation

@erikdarlingdata
Copy link
Owner

Summary

worst.PercentOfAverage is double? but was cast directly to (double) without a null check at Lite/MainWindow.xaml.cs:1294. This would throw InvalidOperationException if the value were ever null.

Fix: (double)(worst.PercentOfAverage ?? 0)

Found via CS8629 compiler warning during build review.

🤖 Generated with Claude Code

worst.PercentOfAverage is double? — casting directly to (double)
would throw InvalidOperationException if null. Added ?? 0 fallback.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit 90f0650 into dev Mar 7, 2026
3 checks passed
@erikdarlingdata erikdarlingdata deleted the fix/nullable-percent-of-average branch March 7, 2026 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant