Fix potential NPE at cover image selector (readmanga/mintmanga) (#560)

Fix potential NPE at cover image selector (readmanga/mintmanga)
This commit is contained in:
Taumer 2018-10-16 13:03:13 +03:00 committed by Carlos
parent 832533aee7
commit c49436d306
4 changed files with 6 additions and 6 deletions

View File

@ -5,8 +5,8 @@ ext {
appName = 'Tachiyomi: Mintmanga'
pkgNameSuffix = 'ru.mintmanga'
extClass = '.Mintmanga'
extVersionCode = 7
extVersionSuffix = 7
extVersionCode = 8
extVersionSuffix = 8
libVersion = '1.2'
}

View File

@ -37,7 +37,7 @@ class Mintmanga : ParsedHttpSource() {
override fun popularMangaFromElement(element: Element): SManga {
val manga = SManga.create()
manga.thumbnail_url = element.select("img.lazy").first().attr("data-original")
manga.thumbnail_url = element.select("img.lazy").first()?.attr("data-original")
element.select("h3 > a").first().let {
manga.setUrlWithoutDomain(it.attr("href"))
manga.title = it.attr("title")

View File

@ -5,8 +5,8 @@ ext {
appName = 'Tachiyomi: Readmanga'
pkgNameSuffix = 'ru.readmanga'
extClass = '.Readmanga'
extVersionCode = 7
extVersionSuffix = 7
extVersionCode = 8
extVersionSuffix = 8
libVersion = '1.2'
}

View File

@ -37,7 +37,7 @@ class Readmanga : ParsedHttpSource() {
override fun popularMangaFromElement(element: Element): SManga {
val manga = SManga.create()
manga.thumbnail_url = element.select("img.lazy").first().attr("data-original")
manga.thumbnail_url = element.select("img.lazy").first()?.attr("data-original")
element.select("h3 > a").first().let {
manga.setUrlWithoutDomain(it.attr("href"))
manga.title = it.attr("title")