Entry: clean up single line init function.

This commit is contained in:
Tom Hacohen 2015-12-21 14:45:34 +00:00
parent 1adf598584
commit 2b8c9217e8
1 changed files with 8 additions and 7 deletions

View File

@ -2665,16 +2665,17 @@ _entry_new_line_filter_cb(void *data EINA_UNUSED,
Evas_Object *entry EINA_UNUSED, Evas_Object *entry EINA_UNUSED,
char **text) char **text)
{ {
char *old_text; char *ret;
if (!*text) return; if (!*text) return;
old_text = *text; ret = _entry_remove_new_line(*text);
*text = _entry_remove_new_line((const char*)*text);
if (*text) if (ret)
free(old_text); {
else free(*text);
*text = old_text; *text = ret;
}
} }
static void static void