edje_edit : add null check and close eet

Signed-off-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
This commit is contained in:
junsu choi 2016-09-20 23:34:17 +09:00 committed by Jaehyun Cho
parent 8f66497aca
commit bed6c84afb
1 changed files with 10 additions and 1 deletions

View File

@ -1675,6 +1675,11 @@ edje_edit_group_copy(Evas_Object *obj, const char *group_name, const char *copy_
}
snprintf(buf, sizeof(buf), "edje/collections/%d", e->id);
epc = eet_data_read(eetf, _edje_edd_edje_part_collection, buf);
if (!epc)
{
eet_close(eetf);
return EINA_FALSE;
}
/* Search first free id */
id = -1;
@ -1703,7 +1708,11 @@ edje_edit_group_copy(Evas_Object *obj, const char *group_name, const char *copy_
/* Create structs */
de = _alloc(sizeof(Edje_Part_Collection_Directory_Entry));
if (!de) return EINA_FALSE;
if (!de)
{
eet_close(eetf);
return EINA_FALSE;
}
/* Init Edje_Part_Collection_Directory_Entry */
de->id = id;