From 1438cb07f8fa5dd842ba7b19b16bc920b0728add Mon Sep 17 00:00:00 2001 From: Sung-jae Park Date: Tue, 12 May 2015 23:40:55 +0900 Subject: [PATCH] Prevent 372807 Change-Id: Ifbf008aef692bf6a48c44b08e1bd6f54bb23959a --- src/script_port.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/script_port.c b/src/script_port.c index e3e7a5f..426cc3d 100644 --- a/src/script_port.c +++ b/src/script_port.c @@ -1408,6 +1408,7 @@ PUBLIC int script_update_script(void *h, const char *src_id, const char *target_ Evas_Object *edje; Evas_Object *obj; struct obj_info *obj_info; + struct obj_info *parent_obj_info; struct child *child; char _target_id[32]; @@ -1417,8 +1418,8 @@ PUBLIC int script_update_script(void *h, const char *src_id, const char *target_ return WIDGET_ERROR_NOT_EXIST; } - obj_info = evas_object_data_get(edje, "obj_info"); - if (!obj_info) { + parent_obj_info = evas_object_data_get(edje, "obj_info"); + if (!parent_obj_info) { ErrPrint("Object info is not valid\n"); return WIDGET_ERROR_INVALID_PARAMETER; } @@ -1533,20 +1534,7 @@ PUBLIC int script_update_script(void *h, const char *src_id, const char *target_ DbgPrint("%s part swallow edje %p\n", part, obj); elm_object_part_content_set(edje, part, obj); - obj_info = evas_object_data_get(edje, "obj_info"); - - if (obj_info == NULL) { - ErrPrint("evas_object_data_get failed\n"); - free(child->part); - free(child); - free(obj_info->id); - free(obj_info); - evas_object_del(obj); - return WIDGET_ERROR_FAULT; - } - - obj_info->children = eina_list_append(obj_info->children, child); - + parent_obj_info->children = eina_list_append(parent_obj_info->children, child); return WIDGET_ERROR_NONE; } -- 2.7.4