yakov pushed a commit to branch master. http://git.enlightenment.org/tools/erigo.git/commit/?id=f0ea55925ac6b4a912c22d287993ba3f3081acbf
commit f0ea55925ac6b4a912c22d287993ba3f3081acbf Author: Yakov Goldberg <[email protected]> Date: Thu Mar 19 17:21:36 2015 +0200 Handle string values when fetching default properties String values which were received with _get() funcs are const char*, but gui_value_del() frees the memory. So need to re-set them. --- src/lib/ffi_abstraction.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/ffi_abstraction.c b/src/lib/ffi_abstraction.c index 66f8392..5b114a0 100644 --- a/src/lib/ffi_abstraction.c +++ b/src/lib/ffi_abstraction.c @@ -251,6 +251,12 @@ _ffi_eo_do_get(const Gui_Session *session, const Gui_Widget *wdg, const Gui_Widg const char *enum_str_value = db_op_desc_nth_par_enum_get(op_desc, i, INT_GET(gui_value)); gui_value_enum_set(gui_value, enum_str_value); } + /* String values which were received with _get() func are const char*, but gui_value_del() frees the memory. + * So need to re-set them. */ + else if (gv_type == GUI_TYPE_STRING) + { + gui_value_string_set(gui_value, STRING_GET(gui_value)); + } i++; } --
