Added null check

This commit is contained in:
Juha Heinanen
2021-11-14 10:00:39 +02:00
parent 46122285dc
commit a9b83c4632

View File

@ -138,6 +138,7 @@ object Config {
fun updateDnsServers(dnsServers: List<InetAddress>): Int {
var servers = ""
for (dnsServer in dnsServers) {
if (dnsServer.hostAddress == null) continue
var address = dnsServer.hostAddress!!.removePrefix("/")
address = if (Utils.checkIpV4(address))
"${address}:53"