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
This commit is contained in:
Vitalii Vorobiov 2014-10-13 16:51:29 +03:00
parent 0ca819974c
commit d8955625ce
1 changed files with 3 additions and 0 deletions

View File

@ -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;