pull/1463/head^2
gedoor 3 years ago
parent 6ca5850ade
commit 0fbee110e8
  1. 4
      app/src/main/java/io/legado/app/utils/NetworkUtils.kt

@ -185,8 +185,8 @@ object NetworkUtils {
* @param input the address string to check for validity.
* @return True if the input parameter is a valid IPv4 address.
*/
fun isIPv4Address(input: String): Boolean {
return IPV4_PATTERN.matcher(input).matches()
fun isIPv4Address(input: String?): Boolean {
return input != null && IPV4_PATTERN.matcher(input).matches()
}
/**

Loading…
Cancel
Save