adding some null checks at menu items

This commit is contained in:
tibbi 2022-07-03 18:51:44 +02:00
parent 456a90dcbb
commit 9b4c0a3308
1 changed files with 7 additions and 3 deletions

View File

@ -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() {