diff --git a/ChangeLog b/ChangeLog index 2bccbdf35..0041f4b31 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-01-17 Francis Lachapelle + + * SoObjects/Appointments/SOGoEMailAlarmsManager.m + (-_lookupEntityMatchingRecord:inCalendar:): We check if + recurrenceId is nil prior calling -timeIntervalSince1970. + 2011-01-14 Francis Lachapelle * SoObjects/Appointments/iCalRepeatableEntityObject+SOGo.m diff --git a/SoObjects/Appointments/SOGoEMailAlarmsManager.m b/SoObjects/Appointments/SOGoEMailAlarmsManager.m index 33d6eb6d5..e410d23ac 100644 --- a/SoObjects/Appointments/SOGoEMailAlarmsManager.m +++ b/SoObjects/Appointments/SOGoEMailAlarmsManager.m @@ -207,8 +207,9 @@ inCalendar: (iCalCalendar *) calendar { NSArray *entities; + NSCalendarDate *testRecId; iCalEntityObject *entity, *testEntity; - int count, max, testRecId; + int count, max, testRecIdSecs; entities = [calendar events]; max = [entities count]; @@ -224,8 +225,9 @@ for (count = 0; !entity && count < max; count++) { testEntity = [entities objectAtIndex: count]; - testRecId = (int) [[testEntity recurrenceId] timeIntervalSince1970]; - if ([[record objectForKey: @"c_recurrence_id"] intValue] == testRecId) + testRecId = [testEntity recurrenceId]; + testRecIdSecs = testRecId? [[testEntity recurrenceId] timeIntervalSince1970] : 0; + if ([[record objectForKey: @"c_recurrence_id"] intValue] == testRecIdSecs) entity = testEntity; } }