From 8a775d662a2046d26b43ddd8d676f191e047cd0c Mon Sep 17 00:00:00 2001 From: yangxing Date: Thu, 23 Mar 2023 22:25:07 +0800 Subject: [PATCH] fix a crash when adding empty custom config --- V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/V2rayConfig.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/V2rayConfig.kt b/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/V2rayConfig.kt index b8b0ad9e..c261f43a 100644 --- a/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/V2rayConfig.kt +++ b/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/V2rayConfig.kt @@ -447,7 +447,7 @@ data class V2rayConfig( var poolSize: Int = 10000) // roughly 10 times smaller than total ip pool fun getProxyOutbound(): OutboundBean? { - outbounds.forEach { outbound -> + outbounds?.forEach { outbound -> EConfigType.values().forEach { if (outbound.protocol.equals(it.name, true)) { return outbound