Browse Source

Avoid crashing in SourcePreferencesScreen if source can't be loaded

arkon 2 years ago
parent
commit
4efca04765

+ 1 - 1
app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/SourcePreferencesScreen.kt

@@ -58,7 +58,7 @@ class SourcePreferencesScreen(val sourceId: Long) : Screen() {
         Scaffold(
             topBar = {
                 TopAppBar(
-                    title = { Text(text = Injekt.get<SourceManager>().get(sourceId)!!.toString()) },
+                    title = { Text(text = Injekt.get<SourceManager>().getOrStub(sourceId).toString()) },
                     navigationIcon = {
                         IconButton(onClick = navigator::pop) {
                             Icon(