From ac6b4235b9293c032ad9a290347e0e2ded0a36b8 Mon Sep 17 00:00:00 2001 From: jmir1 <43830312+jmir1@users.noreply.github.com> Date: Sat, 19 Jun 2021 01:46:45 +0200 Subject: [PATCH] Fix crash when opening the MangaController from... (#5419) ...the browse search null safe cast to TextView because when searching for manga in a source, the toolbar has no children and find() returns null. --- .../main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt index 94ce0b9614..30252949fe 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt @@ -296,7 +296,7 @@ class MangaController : val scrolledList = binding.fullRecycler ?: binding.infoRecycler!! if (toolbarTextView == null) { toolbarTextView = (activity as? MainActivity)?.binding?.toolbar?.children - ?.find { it is TextView } as TextView + ?.find { it is TextView } as? TextView } toolbarTextView?.alpha = when { // Specific alpha provided