summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYakov Goldberg <yakov.g@samsung.com>2015-12-10 16:41:08 +0200
committerYakov Goldberg <yakov.g@samsung.com>2015-12-10 16:41:08 +0200
commitdbe7bb7bd32c635b60ad3acd64b93419d368e8a0 (patch)
tree479b55e619316af79b8355f4a95f55b6ab320b57
parent2cf3a9d2bef9872181c144e60a0d33c2833af015 (diff)
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
-rw-r--r--src/lib/elc_fileselector_entry.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/elc_fileselector_entry.c b/src/lib/elc_fileselector_entry.c
index ba06a6f1c..e998c433e 100644
--- a/src/lib/elc_fileselector_entry.c
+++ b/src/lib/elc_fileselector_entry.c
@@ -73,10 +73,10 @@ _FILE_CHOSEN_fwd(void *data,
73 const char *file = event_info; 73 const char *file = event_info;
74 char *s; 74 char *s;
75 75
76 if (!file) return EINA_TRUE;
76 ELM_FILESELECTOR_ENTRY_DATA_GET(data, sd); 77 ELM_FILESELECTOR_ENTRY_DATA_GET(data, sd);
77 78
78 s = elm_entry_utf8_to_markup(file); 79 s = elm_entry_utf8_to_markup(file);
79 if (!s) return EINA_TRUE;
80 elm_object_text_set(sd->entry, s); 80 elm_object_text_set(sd->entry, s);
81 free(s); 81 free(s);
82 eo_do(data, eo_event_callback_call 82 eo_do(data, eo_event_callback_call