diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Context.kt index a73d52ab1..5679bba2b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/extensions/Context.kt @@ -659,6 +659,7 @@ fun Context.getDatesWeekDateTime(date: DateTime): String { } fun Context.isTaskCompleted(event: Event): Boolean { + if (event.id == null) return false val task = completedTasksDB.getTaskWithIdAndTs(event.id!!, event.startTS) ?: return false return task.flags and FLAG_TASK_COMPLETED != 0 }