From dbd5812c4597ddc50835d7efe89fbc9b7d62509a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Kaan=20K=C3=B6se?= Date: Fri, 13 Feb 2026 10:58:25 +0100 Subject: [PATCH] Fix null handling in WinoCalendarView date range updates (#806) --- Wino.Mail.WinUI/Controls/Calendar/WinoCalendarView.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Wino.Mail.WinUI/Controls/Calendar/WinoCalendarView.cs b/Wino.Mail.WinUI/Controls/Calendar/WinoCalendarView.cs index ea2f3c66..96135b13 100644 --- a/Wino.Mail.WinUI/Controls/Calendar/WinoCalendarView.cs +++ b/Wino.Mail.WinUI/Controls/Calendar/WinoCalendarView.cs @@ -113,6 +113,8 @@ public partial class WinoCalendarView : Control { if (d is WinoCalendarView control) { + if (control.HighlightedDateRange == null) return; + control.SetInnerDisplayDate(control.HighlightedDateRange.StartDate); control.UpdateVisibleDateRangeBackgrounds(); } @@ -120,7 +122,7 @@ public partial class WinoCalendarView : Control public void UpdateVisibleDateRangeBackgrounds() { - if (HighlightedDateRange == null || VisibleDateBackground == null || TodayBackgroundColor == null || CalendarView == null) return; + if (HighlightedDateRange == null || VisibleDateBackground == null || CalendarView == null) return; var markDateCalendarDayItems = WinoVisualTreeHelper.FindDescendants(CalendarView);