diff --git a/app/src/main/java/io/legado/app/help/ReadBookConfig.kt b/app/src/main/java/io/legado/app/help/ReadBookConfig.kt index 252d635a5..45097ff16 100644 --- a/app/src/main/java/io/legado/app/help/ReadBookConfig.kt +++ b/app/src/main/java/io/legado/app/help/ReadBookConfig.kt @@ -46,7 +46,15 @@ object ReadBookConfig { when (bgType) { 0 -> bg = ColorDrawable(Color.parseColor(bgStr)) 1 -> bg = Drawable.createFromStream(App.INSTANCE.assets.open("bg" + File.separator + bgStr), "bg") - 2 -> bg = Drawable.createFromPath(bgStr) + else -> { + try { + bg = Drawable.createFromPath(bgStr) + } finally { + bg ?: let { + bg = ColorDrawable(Color.parseColor("#015A86")) + } + } + } } } }