fix(calendar(core)): check for array size before looking into

This commit is contained in:
Ludovic Marcotte committed 2020-02-27 14:46:21 -05:00
1 parent 72efaa7432
commit 78292495bb
1 file changed
+1 -1
@@ -2258,7 +2258,7 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
if (!oldEvent && !newEvent)
{
// We check if we only have to deal with the MASTER event
if ([newEvents count] == [oldEvents count])
if ([oldEvents count] && [newEvents count] == [oldEvents count])
{
oldEvent = [oldEvents objectAtIndex: 0];
newEvent = [newEvents objectAtIndex: 0];