From 46896d9e863b5b6303d77ac176b335210f0896f0 Mon Sep 17 00:00:00 2001 From: Taumer Date: Sat, 27 Oct 2018 20:17:35 +0300 Subject: [PATCH] Fix potential NPE at cover image selector (#1665) --- .../java/eu/kanade/tachiyomi/source/online/russian/Mintmanga.kt | 2 +- .../java/eu/kanade/tachiyomi/source/online/russian/Readmanga.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/source/online/russian/Mintmanga.kt b/app/src/main/java/eu/kanade/tachiyomi/source/online/russian/Mintmanga.kt index e4a370fff..6a1b68e35 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/source/online/russian/Mintmanga.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/source/online/russian/Mintmanga.kt @@ -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") diff --git a/app/src/main/java/eu/kanade/tachiyomi/source/online/russian/Readmanga.kt b/app/src/main/java/eu/kanade/tachiyomi/source/online/russian/Readmanga.kt index a49817edd..3929c543f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/source/online/russian/Readmanga.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/source/online/russian/Readmanga.kt @@ -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")