exit the app when opening a notification to an invalid event

This commit is contained in:
tibbi 2017-04-23 23:06:29 +02:00
parent f559577d90
commit 87fb85654d

View File

@ -48,6 +48,12 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
val eventId = intent.getIntExtra(EVENT_ID, 0)
val event = dbHelper.getEvent(eventId)
if (eventId != 0 && event == null) {
finish()
return
}
if (event != null) {
mEvent = event
mEventOccurrenceTS = intent.getIntExtra(EVENT_OCCURRENCE_TS, 0)