Fileselector entry: fix a case when file was not selected

Expected behavior: when Cancel or X is pressed in Filesector
don't change entry.
Wrong behavior: entry is cleaned.
If no file was selected 'file' variable is NULL,
and elm_entry_utf8_to_markup(NULL) returns empty string.
Thus this empty string was set to entry.

@fix
This commit is contained in:
Yakov Goldberg 2015-12-10 16:41:08 +02:00
parent b51e267447
commit c6c3a7f78a
1 changed files with 1 additions and 1 deletions

View File

@ -73,10 +73,10 @@ _FILE_CHOSEN_fwd(void *data,
const char *file = event_info;
char *s;
if (!file) return EINA_TRUE;
ELM_FILESELECTOR_ENTRY_DATA_GET(data, sd);
s = elm_entry_utf8_to_markup(file);
if (!s) return EINA_TRUE;
elm_object_text_set(sd->entry, s);
free(s);
eo_do(data, eo_event_callback_call