ryuan pushed a commit to branch master.
commit 6c31a397b8169193a942191a29552f3c44f1245b
Author: Ryuan Choi <[email protected]>
Date: Thu Jul 18 10:25:57 2013 +0900
Revert "Remove redundant check routine what elm_entry_utf8_to_markup()
returns."
This commit is invalid.
It just use strdup and strdup may return NULL when memory is not enough.
This reverts commit f579f7fd4b5e863f01a001876e536f5becc40811.
---
src/lib/elc_fileselector.c | 1 +
src/lib/elc_fileselector_entry.c | 8 ++++++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/lib/elc_fileselector.c b/src/lib/elc_fileselector.c
index 720df02..2d675a2 100644
--- a/src/lib/elc_fileselector.c
+++ b/src/lib/elc_fileselector.c
@@ -227,6 +227,7 @@ _anchors_do(Evas_Object *obj,
ELM_FILESELECTOR_DATA_GET(obj, sd);
s = elm_entry_utf8_to_markup(path);
+ if (!s) return;
buf[0] = '\0';
tok = eina_str_split(s, "/", 0);
diff --git a/src/lib/elc_fileselector_entry.c b/src/lib/elc_fileselector_entry.c
index b1e19ed..f76f8df 100644
--- a/src/lib/elc_fileselector_entry.c
+++ b/src/lib/elc_fileselector_entry.c
@@ -79,6 +79,7 @@ _FILE_CHOSEN_fwd(void *data,
ELM_FILESELECTOR_ENTRY_DATA_GET(data, sd);
s = elm_entry_utf8_to_markup(file);
+ if (!s) return;
elm_object_text_set(sd->entry, s);
free(s);
evas_object_smart_callback_call(data, SIG_FILE_CHOSEN, event_info);
@@ -559,8 +560,11 @@ _path_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
elm_fileselector_button_path_set(sd->button, path);
s = elm_entry_utf8_to_markup(path);
- elm_object_text_set(sd->entry, s);
- free(s);
+ if (s)
+ {
+ elm_object_text_set(sd->entry, s);
+ free(s);
+ }
}
EAPI const char *
--
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk