From c46b863e6920fb5a20a171c29afebb4aba450b60 Mon Sep 17 00:00:00 2001 From: Abhi Date: Sun, 23 Apr 2023 12:22:34 -0400 Subject: [PATCH] Potential crash fix. --- Clocker/Events and Reminders/CalendarHandler.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Clocker/Events and Reminders/CalendarHandler.swift b/Clocker/Events and Reminders/CalendarHandler.swift index ab124f7..896cf8a 100644 --- a/Clocker/Events and Reminders/CalendarHandler.swift +++ b/Clocker/Events and Reminders/CalendarHandler.swift @@ -198,7 +198,7 @@ extension EventCenter { for date in eventsForDate.keys { if let events = eventsForDate[date] { for event in events { - if selectedCalendars.contains(event.event.calendar.calendarIdentifier) { + if event.event.calendar != nil && selectedCalendars.contains(event.event.calendar.calendarIdentifier) { if filteredEvents[date] == nil { filteredEvents[date] = Array() }