From 58e64794385e58aa86eb56989aba5fa31f80c7ac Mon Sep 17 00:00:00 2001 From: Andreas Date: Fri, 19 Aug 2022 22:02:37 +0200 Subject: [PATCH] Fix crash when opening library sheet with empty category list (#7822) --- .../java/eu/kanade/tachiyomi/ui/library/LibraryController.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt index 988b75c6c..2b0e1d154 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt @@ -121,7 +121,7 @@ class LibraryController( } fun showSettingsSheet() { - presenter.categories[presenter.activeCategory].let { category -> + presenter.categories.getOrNull(presenter.activeCategory)?.let { category -> settingsSheet?.show(category) } }