mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-02-01 11:16:48 +01:00
Fix NPE crash when duplicating tasks
This commit is contained in:
parent
b6afd0998d
commit
607c02dfa9
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user