only lookup c_orgmail if it is a NSString.
When the c_orgmail field is null in the db, we'd end up calling non existent methods on NSNull, which segfaults on lenny. Monotone-Parent: 537372cd1b3ee04cca31d933f59aefe5b5782b59 Monotone-Revision: 9cacc7ba282ab08c75e02952d2f95a3f5bdf9010 Monotone-Author: jraby@inverse.ca Monotone-Date: 2012-03-15T21:01:25maint-2.0.2
parent
919e07c9f9
commit
dc416b0a95
|
@ -364,7 +364,10 @@ static NSArray *tasksFields = nil;
|
||||||
{
|
{
|
||||||
// Identifies whether the active user is the organizer
|
// Identifies whether the active user is the organizer
|
||||||
// of this event.
|
// of this event.
|
||||||
if ([ownerUser hasEmail: [newInfo objectForKey: @"c_orgmail"]])
|
NSString *c_orgmail;
|
||||||
|
c_orgmail = [newInfo objectForKey: @"c_orgmail"];
|
||||||
|
|
||||||
|
if ([c_orgmail isKindOfClass: [NSString class]] && [ownerUser hasEmail: c_orgmail])
|
||||||
[newInfo setObject: [NSNumber numberWithInt: 1]
|
[newInfo setObject: [NSNumber numberWithInt: 1]
|
||||||
forKey: @"ownerIsOrganizer"];
|
forKey: @"ownerIsOrganizer"];
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue