diff --git a/app/src/main/java/io/legado/app/help/http/HttpHelper.kt b/app/src/main/java/io/legado/app/help/http/HttpHelper.kt index c995ce8de..3e5ac9fa7 100644 --- a/app/src/main/java/io/legado/app/help/http/HttpHelper.kt +++ b/app/src/main/java/io/legado/app/help/http/HttpHelper.kt @@ -44,10 +44,8 @@ val okHttpClient: OkHttpClient by lazy { .build() chain.proceed(request) }) - if (AppConfig.isCronet && CronetLoader.install()) { - cronetEngine?.let { - builder.addInterceptor(CronetInterceptor(null)) - } + if (AppConfig.isCronet && CronetLoader.install() && cronetEngine != null) { + builder.addInterceptor(CronetInterceptor(null)) } builder.build() }