Fix some crashes

This commit is contained in:
arkon
2022-10-28 21:10:03 -04:00
parent e4a2f35907
commit 5efb31bd71
6 changed files with 13 additions and 11 deletions

View File

@@ -21,8 +21,8 @@ class GetNextChapter(
}
suspend fun await(mangaId: Long, chapterId: Long): Chapter? {
val chapter = getChapter.await(chapterId)!!
val manga = getManga.await(mangaId)!!
val chapter = getChapter.await(chapterId) ?: return null
val manga = getManga.await(mangaId) ?: return null
if (!chapter.read) return chapter