Automation: fix IndexOutOfBoundsException
This commit is contained in:
parent
d33ce02e23
commit
6c49a1423c
1 changed files with 4 additions and 2 deletions
|
@ -292,8 +292,10 @@ class AutomationPlugin @Inject constructor(
|
||||||
|
|
||||||
@Synchronized
|
@Synchronized
|
||||||
fun removeAt(index: Int) {
|
fun removeAt(index: Int) {
|
||||||
automationEvents.removeAt(index)
|
if (index >= 0 && index < automationEvents.size) {
|
||||||
rxBus.send(EventAutomationDataChanged())
|
automationEvents.removeAt(index)
|
||||||
|
rxBus.send(EventAutomationDataChanged())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Synchronized
|
@Synchronized
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue