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:
parent
68216a7456
commit
ef6aab63c9
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue