diff options
author | junkyu han <junkyu.han@samsung.com> | 2016-12-15 16:01:53 +0900 |
---|---|---|
committer | junkyu han <junkyu.han@samsung.com> | 2016-12-15 16:01:53 +0900 |
commit | e794bcb955c12cdf3178047b27e2f062de967206 (patch) | |
tree | 28cf91d499088b3acc613c1e2c7fc7ac4c5d0314 | |
parent | 17497a54c2e661d496ee8090abd5c0d2eba1c5cf (diff) | |
download | w3-home-e794bcb955c12cdf3178047b27e2f062de967206.tar.gz w3-home-e794bcb955c12cdf3178047b27e2f062de967206.tar.bz2 w3-home-e794bcb955c12cdf3178047b27e2f062de967206.zip |
Fix jira issuesubmit/tizen_3.0/20161215.070529
Change-Id: I06e6a89e4203e3376532b19593d101b836ecebbf
-rwxr-xr-x | home/src/add-viewer.c | 8 | ||||
-rwxr-xr-x | home/src/edit.c | 14 | ||||
-rwxr-xr-x | home/src/scroller.c | 7 |
3 files changed, 27 insertions, 2 deletions
diff --git a/home/src/add-viewer.c b/home/src/add-viewer.c index 9c654f4..ca83b92 100755 --- a/home/src/add-viewer.c +++ b/home/src/add-viewer.c @@ -227,6 +227,10 @@ static int reload_list_cb(struct add_viewer_package *package, void *data) scroller_info_s *scroller_info = NULL; scroller_info = evas_object_data_get(widget_data->scroller, DATA_KEY_SCROLLER_INFO); + if (!scroller_info) { + ErrPrint("Failed to get scroller info\n"); + return WIDGET_ERROR_FAULT; + } container = scroller_info->box; children = elm_box_children_get(container); @@ -637,6 +641,10 @@ static void _widget_scroll_cb(void *data, Evas_Object *obj, void *event_info) return; } scroller_info = evas_object_data_get(scroller, DATA_KEY_SCROLLER_INFO); + if (!scroller_info) { + ErrPrint("Failed to get scroller info\n"); + return; + } box = scroller_info->box; if (!box) { diff --git a/home/src/edit.c b/home/src/edit.c index f15ff70..5480005 100755 --- a/home/src/edit.c +++ b/home/src/edit.c @@ -668,10 +668,11 @@ static key_cb_ret_e _add_viewer_back_key_cb(void *data) retv_if(!layout, KEY_CB_RET_CONTINUE); layout_info = evas_object_data_get(layout, DATA_KEY_LAYOUT_INFO); - retv_if(!layout, KEY_CB_RET_CONTINUE); + retv_if(!layout_info, KEY_CB_RET_CONTINUE); if (layout_info->edit) { edit_info_s *edit_info = evas_object_data_get(layout_info->edit, DATA_KEY_EDIT_INFO); + retv_if(!edit_info, KEY_CB_RET_CONTINUE); scroller_init_rotary(edit_info->scroller); elm_object_tree_focus_allow_set(layout_info->edit, EINA_TRUE); @@ -1098,12 +1099,19 @@ static Evas_Object *_add_widget_in_normal(Evas_Object *layout, const char *id, c item_ao = screen_reader_create_access_object(access_info); if (!item_ao) { _E("Failed to create access object"); - evas_object_del(page); free(access_info); + evas_object_del(page); goto ERROR; } screen_reader_make_relationship(item, item); page_info = evas_object_data_get(page, DATA_KEY_PAGE_INFO); + if (!page_info) { + _E("Failed to get page info"); + evas_object_del(item_ao); + free(access_info); + evas_object_del(page); + goto ERROR; + } page_info->access_info = access_info; scroller_push_page(layout_info->scroller, page, SCROLLER_PUSH_TYPE_LAST); @@ -1374,6 +1382,7 @@ static Eina_Bool _anim_move_page_before_cb(void *data) retv_if(!scroller_info, ECORE_CALLBACK_CANCEL); page = evas_object_data_get(scroller, PRIVATE_DATA_KEY_SCROLLER_PAGE_FOR_MOVING); + retv_if(!page, ECORE_CALLBACK_CANCEL); evas_object_geometry_get(page, NULL, NULL, &w, &h); w += SLIPPED_LENGTH_BEFORE; @@ -1471,6 +1480,7 @@ static Eina_Bool _anim_move_page_after_cb(void *data) evas_object_size_hint_min_set(rect, w, h); if (w <= 0) { page = evas_object_data_get(scroller, PRIVATE_DATA_KEY_SCROLLER_PAGE_FOR_MOVING); + retv_if(!page, ECORE_CALLBACK_CANCEL); elm_box_unpack(scroller_info->box, rect); scroller_bring_in_page(scroller, page, SCROLLER_FREEZE_ON, SCROLLER_BRING_TYPE_INSTANT); evas_object_del(rect); diff --git a/home/src/scroller.c b/home/src/scroller.c index 3a2bb31..295cf37 100755 --- a/home/src/scroller.c +++ b/home/src/scroller.c @@ -741,6 +741,7 @@ HAPI void scroller_init_rotary(Evas_Object *scroller) eext_rotary_object_event_callback_add(scroller, _rotary_cb, NULL); scroller_info = evas_object_data_get(scroller, DATA_KEY_SCROLLER_INFO); + ret_if(!scroller_info); if (scroller_info->scroller_type == WIDGETS_STATE_NORMAL) { _D("This scroller is Normal scroller"); @@ -1438,6 +1439,12 @@ static Eina_Bool _push_all_page_cb(void *data) } screen_reader_make_relationship(page_info->item, page_info->item); real_page_info = evas_object_data_get(page_info->page, DATA_KEY_PAGE_INFO); + if (!real_page_info) { + _E("Failed to get real page info"); + free(access_info); + evas_object_del(page_info->item); + goto END; + } real_page_info->access_info = access_info; page_set_effect(page_info->page, page_effect_none, page_effect_none); |