diff --git a/src/at/bitfire/davdroid/resource/LocalAddressBook.java b/src/at/bitfire/davdroid/resource/LocalAddressBook.java index dce27d73..102b76d2 100644 --- a/src/at/bitfire/davdroid/resource/LocalAddressBook.java +++ b/src/at/bitfire/davdroid/resource/LocalAddressBook.java @@ -699,11 +699,13 @@ public class LocalAddressBook extends LocalCollection { protected Builder buildOrganization(Builder builder, ezvcard.property.Organization organization, String jobTitle, String jobDescription) { String company = null, department = null; - Iterator org = organization.getValues().iterator(); - if (org.hasNext()) - company = org.next(); - if (org.hasNext()) - department = org.next(); + if (organization != null) { + Iterator 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)