diff --git a/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/AutomationPlugin.kt b/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/AutomationPlugin.kt index c05d04f0db..bf0a446443 100644 --- a/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/AutomationPlugin.kt +++ b/automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/AutomationPlugin.kt @@ -150,7 +150,7 @@ class AutomationPlugin @Inject constructor( private fun storeToSP() { val array = JSONArray() - val iterator = automationEvents.iterator() + val iterator = ArrayList(automationEvents).iterator() try { while (iterator.hasNext()) { val event = iterator.next()