From 865bf096f51dc76cae4fb2d7847d9ef26e0e2c27 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Wed, 17 Sep 2014 15:45:31 -0400 Subject: [PATCH] Don't add an empty category to a contact --- UI/Contacts/UIxContactEditor.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/UI/Contacts/UIxContactEditor.m b/UI/Contacts/UIxContactEditor.m index 27bd3bfe3..04159d396 100644 --- a/UI/Contacts/UIxContactEditor.m +++ b/UI/Contacts/UIxContactEditor.m @@ -485,7 +485,11 @@ static Class SOGoContactGCSEntryK = Nil; o = [values objectAtIndex: i]; if ([o isKindOfClass: [NSDictionary class]]) { - [categories addObject: [o objectForKey: @"value"]]; + o = [o objectForKey: @"value"]; + if (o && [o isKindOfClass: [NSString class]] && [(NSString *) o length] > 0) + { + [categories addObject: o]; + } } } [card setCategories: categories];