Evas_Object *edje;
Evas_Object *obj;
struct obj_info *obj_info;
+ struct obj_info *parent_obj_info;
struct child *child;
char _target_id[32];
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;
}
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;
}