diff options
author | Andrii Kroitor <an.kroitor@samsung.com> | 2016-05-10 15:44:30 -0700 |
---|---|---|
committer | Cedric Bail <cedric@osg.samsung.com> | 2016-05-10 16:36:22 -0700 |
commit | 0413c26f82fb5a9ffcbd02158536e7c39a34d22e (patch) | |
tree | 11fe1011e370db4fd4a3aa6109985f96acbbd57c | |
parent | 557381a070d818aa2353a0785a0d20bb6406afaf (diff) |
edje_edit: fix edje_edit_group_copy
Summary:
Writing copy directly to file.
Old way (adding directly to collection cache) leads to possible segfaults
on edje_collection_cache_flush.
Reviewers: reutskiy.v.v, cedric
Subscribers: jpeg
Differential Revision: https://phab.enlightenment.org/D3904
Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
-rw-r--r-- | src/lib/edje/edje_edit.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c index bd5552a0e3..38a26e02dc 100644 --- a/src/lib/edje/edje_edit.c +++ b/src/lib/edje/edje_edit.c | |||
@@ -1712,7 +1712,8 @@ edje_edit_group_copy(Evas_Object *obj, const char *group_name, const char *copy_ | |||
1712 | 1712 | ||
1713 | epc->id = id; | 1713 | epc->id = id; |
1714 | epc->part = eina_stringshare_add(copy_name); | 1714 | epc->part = eina_stringshare_add(copy_name); |
1715 | ed->file->collection_cache = eina_list_prepend(ed->file->collection_cache, epc); | 1715 | snprintf(buf, sizeof(buf), "edje/collections/%i", epc->id); |
1716 | eet_data_write(eetf, _edje_edd_edje_part_collection, buf, epc, 1); | ||
1716 | 1717 | ||
1717 | /* Copying Scripts */ | 1718 | /* Copying Scripts */ |
1718 | snprintf(buf, sizeof(buf), "edje/scripts/embryo/compiled/%d", e->id); | 1719 | snprintf(buf, sizeof(buf), "edje/scripts/embryo/compiled/%d", e->id); |
@@ -1743,6 +1744,8 @@ edje_edit_group_copy(Evas_Object *obj, const char *group_name, const char *copy_ | |||
1743 | free(keys); | 1744 | free(keys); |
1744 | } | 1745 | } |
1745 | 1746 | ||
1747 | _edje_edit_edje_file_save(eetf, ed->file); | ||
1748 | _edje_collection_free(ed->file, epc, de); | ||
1746 | eet_close(eetf); | 1749 | eet_close(eetf); |
1747 | 1750 | ||
1748 | return EINA_TRUE; | 1751 | return EINA_TRUE; |