From 5d03e01d1303dcaa4cb2dfee03d3c2226795464f Mon Sep 17 00:00:00 2001 From: Cheoleun Moon Date: Tue, 18 May 2021 19:00:12 +0900 Subject: [PATCH] Split entry_text only when it is valid Change-Id: Id16707ba4f387477a108becedc12afde0e7541e7 Signed-off-by: Cheoleun Moon --- common/common_ip_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/common_ip_info.c b/common/common_ip_info.c index b3f76e6..d64f987 100644 --- a/common/common_ip_info.c +++ b/common/common_ip_info.c @@ -395,7 +395,6 @@ static void _ip_info_entry_changed_cb(void *data, char entry_ip_text[16] = { 0, }; gboolean fixed = FALSE; entry_text = elm_entry_markup_to_utf8(elm_entry_entry_get(obj)); - ip_text = g_strsplit(entry_text, ".", 5); if (entry_text == NULL || entry_text[0] == '\0') { if (entry_info->entry_txt) { @@ -407,6 +406,7 @@ static void _ip_info_entry_changed_cb(void *data, g_free(entry_text); entry_text = NULL; } else { + ip_text = g_strsplit(entry_text, ".", 5); for (i = 0; i < 5; i++) { if (ip_text[i] == NULL) break; -- 2.7.4