Avoid crashing if getChapterUrl is not implemented
Fixes #9105 (cherry picked from commit ceaf579cb0b4b0ecdf2e56f245a2fad2b6ed2e85)
This commit is contained in:
parent
268f542bbb
commit
366219d7f5
@ -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