diff --git a/SOPE/NGCards/CardElement.m b/SOPE/NGCards/CardElement.m index d87b65509..6b103539f 100644 --- a/SOPE/NGCards/CardElement.m +++ b/SOPE/NGCards/CardElement.m @@ -136,7 +136,7 @@ { NSMutableArray *oldValues, *subValues; - if ([newValues isKindOfClass: [NSString class]]) + if (newValues && [newValues isKindOfClass: [NSString class]]) return [self setSingleValue: (NSString *)newValues atIndex: idx forKey: key]; diff --git a/SoObjects/Contacts/NGVCard+SOGo.m b/SoObjects/Contacts/NGVCard+SOGo.m index 48419ebec..b430e124d 100644 --- a/SoObjects/Contacts/NGVCard+SOGo.m +++ b/SoObjects/Contacts/NGVCard+SOGo.m @@ -314,19 +314,20 @@ convention: o = [ldifRecord objectForKey: @"o"]; if ([o isKindOfClass: [NSArray class]]) [units addObjectsFromArray: (NSArray *)o]; - else if (ou) + else if (o) [units addObject: o]; [self setOrganizations: units]; [self _setPhoneValues: ldifRecord]; [self _setEmails: ldifRecord]; [[self elementWithTag: @"url" ofType: @"home"] - setValues: [ldifRecord objectForKey: @"mozillahomeurl"] forKey: @""]; + setValues: [ldifRecord objectForKey: @"mozillahomeurl"] atIndex: 0 forKey: @""]; [[self elementWithTag: @"url" ofType: @"work"] - setValues: [ldifRecord objectForKey: @"mozillaworkurl"] forKey: @""]; + setValues: [ldifRecord objectForKey: @"mozillaworkurl"] atIndex: 0 forKey: @""]; [[self uniqueChildWithTag: @"x-aim"] setValues: [ldifRecord objectForKey: @"nsaimid"] + atIndex: 0 forKey: @""]; now = [NSCalendarDate date];