```private var items = emptyList<ChannelHead>() pr...
# announcements
u
Copy code
private var items = emptyList<ChannelHead>()
private val itemGetter: (Int) -> ChannelHead = items::get

...
fun setData(items: List<ChannelHead>) {
   this.items = items
}
later when itemGetter called this crashes on
java.lang.IndexOutOfBoundsException: Empty list doesn't contain element at index 1.