adding some null checks at menu items
This commit is contained in:
parent
456a90dcbb
commit
9b4c0a3308
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue