1
0
mirror of https://github.com/etesync/android synced 2024-11-26 09:58:11 +00:00

Fix crash when ROLE/TITLE but no ORG value set (fixes #163)

This commit is contained in:
rfc2822 2014-01-26 12:50:50 +01:00
parent ea06c4a7a1
commit ea31f5a621

View File

@ -699,11 +699,13 @@ public class LocalAddressBook extends LocalCollection<Contact> {
protected Builder buildOrganization(Builder builder, ezvcard.property.Organization organization, String jobTitle, String jobDescription) {
String company = null, department = null;
Iterator<String> org = organization.getValues().iterator();
if (org.hasNext())
company = org.next();
if (org.hasNext())
department = org.next();
if (organization != null) {
Iterator<String> org = organization.getValues().iterator();
if (org.hasNext())
company = org.next();
if (org.hasNext())
department = org.next();
}
return builder
.withValue(Data.MIMETYPE, Organization.CONTENT_ITEM_TYPE)