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 {
|
findItem(R.id.edit).setOnMenuItemClickListener {
|
||||||
launchEditContact(contact!!)
|
if (contact != null) {
|
||||||
|
launchEditContact(contact!!)
|
||||||
|
}
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -294,8 +296,10 @@ class ViewContactActivity : ContactActivity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun openWith() {
|
private fun openWith() {
|
||||||
val uri = getContactPublicUri(contact!!)
|
if (contact != null) {
|
||||||
launchViewContactIntent(uri)
|
val uri = getContactPublicUri(contact!!)
|
||||||
|
launchViewContactIntent(uri)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupFavorite() {
|
private fun setupFavorite() {
|
||||||
|
|
Loading…
Reference in New Issue