check if dataSet postition is valid

workaround for #1187

True problem is probably dataSet getting updated too early
This commit is contained in:
Anton Kesy 2022-02-02 07:47:24 +01:00
parent 597d307c66
commit be24fb446a
No known key found for this signature in database
GPG key ID: 26492A6A3BCC2AF0

View file

@ -142,7 +142,7 @@ class SongFileAdapter(
} }
override fun getPopupText(position: Int): String { override fun getPopupText(position: Int): String {
return getSectionName(position) return if (position >= dataSet.lastIndex) "" else getSectionName(position)
} }
private fun getSectionName(position: Int): String { private fun getSectionName(position: Int): String {