mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-19 18:35:25 +00:00
fix(calendar): Fix assertion when is_cycle is set but without c_cycleinfo. Fixes #5950.
This commit is contained in:
@@ -1289,13 +1289,12 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (![content isNotNull])
|
||||
if (nil != content)
|
||||
{
|
||||
cycleinfo = [content propertyList];
|
||||
if (!cycleinfo)
|
||||
{
|
||||
[self errorWithFormat:@"cyclic record doesn't have cycleinfo -> %@", theRecord];
|
||||
[self errorWithFormat:@"cyclic record doesn't have cycleinfo -> %@, %@", theRecord, content];
|
||||
return;
|
||||
}
|
||||
rules = [cycleinfo objectForKey: @"rules"];
|
||||
@@ -1303,7 +1302,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
|
||||
rDates = [cycleinfo objectForKey: @"rDates"];
|
||||
exDates = [cycleinfo objectForKey: @"exDates"];
|
||||
} else {
|
||||
[self errorWithFormat:@"cyclic record doesn't have cycleinfo -> %@", theRecord];
|
||||
[self warnWithFormat:@"record has no valid content -> %@, %@", theRecord, content];
|
||||
}
|
||||
|
||||
eventTimeZone = nil;
|
||||
|
||||
Reference in New Issue
Block a user