浏览代码

Fix crash when opening library sheet with empty category list (#7822)

Andreas 2 年之前
父节点
当前提交
58e6479438
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt

+ 1 - 1
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)
         }
     }