From 3b18d2d7abf7802026bb273b6f627c7d8ad57c8a Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 13 Nov 2017 12:14:34 +0100 Subject: [PATCH] add a crashfix at creating caldav events --- .../com/simplemobiletools/calendar/activities/EventActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 0720c6220..e41a1c5a3 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/EventActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/EventActivity.kt @@ -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) {