Merge pull request #186 from zentyal/ejhernandez/cherry-pick-42f10e1

(fix) safe-guard against not-yet-created calendar of local users
This commit is contained in:
Enrique J. Hernández 2015-09-18 21:57:25 +02:00
commit fc8eedf494

View file

@ -2980,7 +2980,10 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
theUser = [SOGoUser userWithLogin: theUID];
aParent = [theUser calendarsFolderInContext: context];
if ([aParent isKindOfClass: [NSException class]])
return nil;
aFolders = [aParent subFolders];
e = [aFolders objectEnumerator];
while ((aFolder = [e nextObject]))