From 0fbee110e8a9eceb69c87491155363356f6db26e Mon Sep 17 00:00:00 2001 From: gedoor Date: Fri, 10 Dec 2021 20:54:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/utils/NetworkUtils.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/utils/NetworkUtils.kt b/app/src/main/java/io/legado/app/utils/NetworkUtils.kt index bc34b15bf..ece587df0 100644 --- a/app/src/main/java/io/legado/app/utils/NetworkUtils.kt +++ b/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() } /**