mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
adding some null checks at menu items
This commit is contained in:
@ -109,7 +109,9 @@ class ViewContactActivity : ContactActivity() {
|
||||
}
|
||||
|
||||
findItem(R.id.edit).setOnMenuItemClickListener {
|
||||
launchEditContact(contact!!)
|
||||
if (contact != null) {
|
||||
launchEditContact(contact!!)
|
||||
}
|
||||
true
|
||||
}
|
||||
|
||||
@ -294,8 +296,10 @@ class ViewContactActivity : ContactActivity() {
|
||||
}
|
||||
|
||||
private fun openWith() {
|
||||
val uri = getContactPublicUri(contact!!)
|
||||
launchViewContactIntent(uri)
|
||||
if (contact != null) {
|
||||
val uri = getContactPublicUri(contact!!)
|
||||
launchViewContactIntent(uri)
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupFavorite() {
|
||||
|
Reference in New Issue
Block a user