fix: NPE on generateRuleSet

This commit is contained in:
purofle 2024-02-18 16:42:07 +08:00
parent b34c0124da
commit ed5b75e16c
No known key found for this signature in database
GPG Key ID: 57DEC1478152D973

View File

@ -74,7 +74,7 @@ fun SingBoxOptions.DNSRule_DefaultOptions.checkEmpty(): Boolean {
}
fun SingBoxOptions.Rule_DefaultOptions.generateRuleSet(ruleSet: MutableList<RuleSet>) {
rule_set.forEach {
rule_set?.forEach {
when {
it.startsWith("geoip") -> {
val geoipPath = GeoipUtils.generateRuleSet(country = it.removePrefix("geoip:"))