Skip to content
Snippets Groups Projects
Commit 9558739e authored by Nicolas Pomepuy's avatar Nicolas Pomepuy Committed by Geoffrey Métais
Browse files

Fix crash when initializing with an empty chapter list

(cherry picked from commit 98fd9572)
parent c15dd683
No related branches found
No related tags found
No related merge requests found
Pipeline #6680 passed with stage
in 3 minutes and 59 seconds
......@@ -310,6 +310,7 @@ class PlayerOptionsDelegate(val activity: AppCompatActivity, val service: Playba
private fun initChapters(binding: PlayerOptionItemBinding) {
val chapters = service.getChapters(-1) ?: return
if (chapters.isEmpty()) return
val index = service.chapterIdx
if (chapters[index].name.isNullOrEmpty())
binding.optionTitle.text = String.format("%s %d", res.getString(R.string.chapter), index)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment