handle null names at importing gracefully

This commit is contained in:
tibbi 2019-08-25 22:34:30 +02:00
parent 4e88bf518f
commit 0342035b27
1 changed files with 1 additions and 1 deletions

View File

@ -135,7 +135,7 @@ class VcfImporter(val activity: SimpleActivity) {
targetContactSource, starred, contactId, thumbnailUri, photo, notes, groups, organization, websites, IMs)
// if there is no N and ORG fields at the given contact, only FN, treat it as an organization
if (contact.getNameToDisplay().isEmpty() && contact.organization.isEmpty() && ezContact.formattedName.value.isNotEmpty()) {
if (contact.getNameToDisplay().isEmpty() && contact.organization.isEmpty() && ezContact.formattedName?.value?.isNotEmpty() == true) {
contact.organization.company = ezContact.formattedName.value
}