Avoid crashing if getChapterUrl is not implemented
Fixes #9105 (cherry picked from commit ceaf579cb0b4b0ecdf2e56f245a2fad2b6ed2e85) (cherry picked from commit 366219d7f59054f6582900f284b4095844a78373)
This commit is contained in:
parent
3455971fe8
commit
c2ec098cb1
@ -682,7 +682,12 @@ class ReaderViewModel(
|
|||||||
val sChapter = getCurrentChapter()?.chapter ?: return null
|
val sChapter = getCurrentChapter()?.chapter ?: return null
|
||||||
val source = getSource() ?: return null
|
val source = getSource() ?: return null
|
||||||
|
|
||||||
return source.getChapterUrl(sChapter)
|
return try {
|
||||||
|
source.getChapterUrl(sChapter)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
logcat(LogPriority.ERROR, e)
|
||||||
|
null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user