Skip to content
This repository was archived by the owner on Jun 9, 2025. It is now read-only.

Commit 458de45

Browse files
committed
Check cursor has next value
1 parent 21622fe commit 458de45

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/src/main/kotlin/at/bitfire/ical4android/AndroidEvent.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -703,9 +703,9 @@ abstract class AndroidEvent(
703703
var rebuild = false
704704
if (event.status == null)
705705
calendar.provider.query(eventSyncURI(), arrayOf(Events.STATUS), null, null, null)?.use { cursor ->
706-
cursor.moveToNext()
707-
if (!cursor.isNull(0)) // Events.STATUS != null
708-
rebuild = true
706+
if (cursor.moveToNext())
707+
if (!cursor.isNull(0)) // Events.STATUS != null
708+
rebuild = true
709709
}
710710

711711
if (rebuild) { // delete whole event and insert updated event

0 commit comments

Comments
 (0)