Merge pull request #1238 from antonkesy/workaround-sd-crash

Prevent app from crashing when SD-card data is not valid anymore.
This commit is contained in:
Prathamesh More 2022-02-02 18:00:57 +05:30 committed by GitHub
commit 666f52adb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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