double error and crash fix
This commit is contained in:
parent
5a482d8307
commit
cd3aad1c33
2 changed files with 5 additions and 1 deletions
|
@ -215,6 +215,10 @@ class MangaReaderActivity : AppCompatActivity() {
|
|||
logError(e)
|
||||
}
|
||||
}
|
||||
//check that index is not out of bounds (crash fix)
|
||||
if (media.selected!!.sourceIndex >= model.mangaReadSources!!.names.size) {
|
||||
media.selected!!.sourceIndex = 0
|
||||
}
|
||||
binding.mangaReaderSource.text = model.mangaReadSources!!.names[media.selected!!.sourceIndex]
|
||||
|
||||
binding.mangaReaderTitle.text = media.userPreferredName
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue