mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-23 07:12:42 +00:00
oc-calendar: Don't change event recurrence if parse failed.
get_AppointmentRecurrencePattern() can fail to parse the input data, added a check to avoid setup the recurrence pattern in that case. This should only happen when input data is incorrect.
This commit is contained in:
@@ -81,6 +81,12 @@
|
||||
|
||||
blob = [mapiRecurrenceData asBinaryInMemCtx: memCtx];
|
||||
pattern = get_AppointmentRecurrencePattern (memCtx, blob);
|
||||
|
||||
if (pattern == NULL) {
|
||||
[self logWithFormat: @"Error parsing recurrence pattern. No changes in event recurrence will be done"];
|
||||
return;
|
||||
}
|
||||
|
||||
[(iCalCalendar *) parent
|
||||
setupRecurrenceWithMasterEntity: self
|
||||
fromRecurrencePattern: &pattern->RecurrencePattern];
|
||||
|
||||
Reference in New Issue
Block a user