From dc416b0a9591a2e804202870c3a114dcf55e4577 Mon Sep 17 00:00:00 2001 From: Jean Raby Date: Thu, 15 Mar 2012 21:01:25 +0000 Subject: [PATCH] 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:25 --- UI/Scheduler/UIxCalListingActions.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/UI/Scheduler/UIxCalListingActions.m b/UI/Scheduler/UIxCalListingActions.m index 4b4a956c4..854537bd8 100644 --- a/UI/Scheduler/UIxCalListingActions.m +++ b/UI/Scheduler/UIxCalListingActions.m @@ -364,7 +364,10 @@ static NSArray *tasksFields = nil; { // Identifies whether the active user is the organizer // 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] forKey: @"ownerIsOrganizer"]; else