summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2016-03-06 08:22:48 +0200
committerDaniel Zaoui <daniel.zaoui@samsung.com>2016-03-06 08:22:48 +0200
commit239474060d6d15f2e7e031345c28616fca533aee (patch)
tree4268962ce05986dea4b53d79423ebc3fdffe9346
parent61fcd9004433dac9e10ee1f92830ec00f7be245b (diff)
Fix callbacks generation
-rw-r--r--src/lib/ea_json_generator.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/ea_json_generator.c b/src/lib/ea_json_generator.c
index e26d53e..638e951 100644
--- a/src/lib/ea_json_generator.c
+++ b/src/lib/ea_json_generator.c
@@ -233,6 +233,7 @@ _object_json_generate(Ea *ea_obj)
233 { 233 {
234 Ea *action; 234 Ea *action;
235 Eina_Bool add_iter = !!ea_callback_next_get(callback); 235 Eina_Bool add_iter = !!ea_callback_next_get(callback);
236 jactions = NULL;
236 do 237 do
237 { 238 {
238 Eina_Iterator *itr2 = ea_callback_actions_get(callback); 239 Eina_Iterator *itr2 = ea_callback_actions_get(callback);
@@ -240,7 +241,7 @@ _object_json_generate(Ea *ea_obj)
240 { 241 {
241 const char *event_name = eolian_event_name_get(ea_callback_event_get(callback)); 242 const char *event_name = eolian_event_name_get(ea_callback_event_get(callback));
242 jactions = json_object_new_array(); 243 jactions = json_object_new_array();
243 js_elts = json_object_new_object(); 244 if (!js_elts) js_elts = json_object_new_object();
244 json_object_object_add(js_elts, event_name, jactions); 245 json_object_object_add(js_elts, event_name, jactions);
245 } 246 }
246 if (itr2 && add_iter) json_object_array_add(jactions, 247 if (itr2 && add_iter) json_object_array_add(jactions,