From 678e870b00e20d036bcddc072960472cac9b03db Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 6 Jul 2017 22:58:49 +0200 Subject: [PATCH] make sure mEvent is initialized when working with it at EventActivity --- .../simplemobiletools/calendar/activities/EventActivity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/EventActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/EventActivity.kt index 0084404a7..01a2407bf 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/EventActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/EventActivity.kt @@ -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 }