mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-01 16:39:46 +00:00
Fixup empty calendars, sogod crashing when it tries to call
stringByEscapingHTMLString on NSNull objects. Those happen to be there when not all fields of the calendar are filled in. Leading to errors like: ERROR(-[NSNull(misc) forwardInvocation:]): called selector stringByEscapingHTMLString on NSNull ! and subsequent crashes on the instance serving that request.
This commit is contained in:
@@ -492,7 +492,7 @@ static NSArray *tasksFields = nil;
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
currentInfo = [newInfoForComponent objectAtIndex: i];
|
||||
if ([currentInfo respondsToSelector: @selector (stringByEscapingHTMLString)])
|
||||
if (![currentInfo isEqual:[NSNull null]] && [currentInfo respondsToSelector: @selector (stringByEscapingHTMLString)])
|
||||
[newInfoForComponent replaceObjectAtIndex: i withObject: [currentInfo stringByEscapingHTMLString]];
|
||||
}
|
||||
[infos addObject: newInfoForComponent];
|
||||
|
||||
Reference in New Issue
Block a user