add a crashfix at creating caldav events

This commit is contained in:
tibbi 2017-11-13 12:14:34 +01:00
parent debb18a0d4
commit 3b18d2d7ab
1 changed files with 1 additions and 1 deletions

View File

@ -521,7 +521,7 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
val newEventType = if (!config.caldavSync || config.lastUsedCaldavCalendar == 0 || mEventCalendarId == STORED_LOCALLY_ONLY) {
mEventTypeId
} else {
dbHelper.getEventTypeWithCalDAVCalendarId(config.lastUsedCaldavCalendar)!!.id
dbHelper.getEventTypeWithCalDAVCalendarId(config.lastUsedCaldavCalendar)?.id ?: DBHelper.REGULAR_EVENT_TYPE_ID
}
val newSource = if (!config.caldavSync || config.lastUsedCaldavCalendar == 0 || mEventCalendarId == STORED_LOCALLY_ONLY) {