make sure mEvent is initialized when working with it at EventActivity

This commit is contained in:
tibbi 2017-07-06 22:58:49 +02:00
parent 5a86786894
commit 678e870b00

View File

@ -390,8 +390,8 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
override fun onCreateOptionsMenu(menu: Menu): Boolean {
menuInflater.inflate(R.menu.menu_event, menu)
menu.findItem(R.id.delete).isVisible = mEvent.id != 0
menu.findItem(R.id.share).isVisible = mEvent.id != 0
menu.findItem(R.id.delete).isVisible = mDialogTheme != 0 && mEvent.id != 0
menu.findItem(R.id.share).isVisible = mDialogTheme != 0 && mEvent.id != 0
return true
}