check null caldav event description

This commit is contained in:
tibbi 2017-08-29 23:35:38 +02:00
parent 4c4266da26
commit 1f1e1a0e58
1 changed files with 2 additions and 2 deletions

View File

@ -217,7 +217,7 @@ class CalDAVHandler(val context: Context) {
do {
val id = cursor.getLongValue(CalendarContract.Events._ID)
val title = cursor.getStringValue(CalendarContract.Events.TITLE) ?: continue
val description = cursor.getStringValue(CalendarContract.Events.DESCRIPTION)
val description = cursor.getStringValue(CalendarContract.Events.DESCRIPTION) ?: ""
val startTS = (cursor.getLongValue(CalendarContract.Events.DTSTART) / 1000).toInt()
var endTS = (cursor.getLongValue(CalendarContract.Events.DTEND) / 1000).toInt()
val allDay = cursor.getIntValue(CalendarContract.Events.ALL_DAY)
@ -366,7 +366,7 @@ class CalDAVHandler(val context: Context) {
val contentUri = ContentUris.withAppendedId(uri, event.getCalDAVEventId())
try {
context.contentResolver.delete(contentUri, null, null)
} catch (ignored: SecurityException) {
} catch (ignored: Exception) {
}
}