mirror of
https://github.com/FossifyOrg/Contacts.git
synced 2026-02-05 05:02:02 -05:00
catch exceptions thrown at getting contacts
This commit is contained in:
@@ -141,7 +141,13 @@ class ViewContactActivity : ContactActivity() {
|
||||
|
||||
private fun initContact() {
|
||||
var wasLookupKeyUsed = false
|
||||
var contactId = intent.getIntExtra(CONTACT_ID, 0)
|
||||
var contactId: Int
|
||||
try {
|
||||
contactId = intent.getIntExtra(CONTACT_ID, 0)
|
||||
} catch (e: Exception) {
|
||||
return
|
||||
}
|
||||
|
||||
if (contactId == 0 && isViewIntent) {
|
||||
val data = intent.data
|
||||
if (data != null) {
|
||||
|
||||
Reference in New Issue
Block a user