From d5c9d32f86c5dc74afc1519f8a6ae90504b2a29a Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 8 Apr 2018 10:51:58 +0200 Subject: [PATCH] handle null address --- .../com/simplemobiletools/contacts/helpers/ContactsHelper.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/ContactsHelper.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/ContactsHelper.kt index 6c393f7e..410cf2d5 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/ContactsHelper.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/helpers/ContactsHelper.kt @@ -233,7 +233,7 @@ class ContactsHelper(val activity: BaseSimpleActivity) { if (cursor?.moveToFirst() == true) { do { val id = cursor.getIntValue(ContactsContract.Data.RAW_CONTACT_ID) - val address = cursor.getStringValue(CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS) + val address = cursor.getStringValue(CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS) ?: "" val type = cursor.getIntValue(CommonDataKinds.StructuredPostal.TYPE) if (addresses[id] == null) {