furrymyad pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=d8955625ced19eb46b08f7dd20d7b5dfe4a450fe

commit d8955625ced19eb46b08f7dd20d7b5dfe4a450fe
Author: Vitalii Vorobiov <[email protected]>
Date:   Mon Oct 13 16:51:29 2014 +0300

    Edje_Edit: creating new hash in global data if it is not created yet
    
    Summary: edje_edit_data_add doesn't work if loaded EDJ file doesn't contain
    any data items. It can't add new data item to emptry (NULL) hash.
    Now, if there is no data in EDJ yet (so hash is empty), by adding new data 
it
    will create hash and after that will add new data.
    
    @fix
---
 src/lib/edje/edje_edit.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index 532c6e5..bc743c6 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -2229,6 +2229,9 @@ edje_edit_data_add(Evas_Object *obj, const char 
*itemname, const char *value)
    if (!itemname || !ed->file)
      return EINA_FALSE;
 
+   if (!ed->file->data)
+     ed->file->data = eina_hash_string_small_new(NULL);
+
    if (eina_hash_find(ed->file->data, itemname))
      return EINA_FALSE;
 

-- 


Reply via email to