From: Cheoleun Moon Date: Tue, 18 May 2021 10:00:12 +0000 (+0900) Subject: Split entry_text only when it is valid X-Git-Tag: accepted/tizen/unified/20210602.122538~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d03e01d1303dcaa4cb2dfee03d3c2226795464f;p=apps%2Fnative%2Fug-wifi-efl.git Split entry_text only when it is valid Change-Id: Id16707ba4f387477a108becedc12afde0e7541e7 Signed-off-by: Cheoleun Moon --- 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;