aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-04-26 17:30:35 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-04-30 20:45:47 +0200
commitcf05507bee984bb1435e696ae9e4feafb912ad87 (patch)
treeb5ea0f7ddad95fcfe00e90089e6a8e2c9fd6af50
parentefl_ui_pager: implement content iterator (diff)
downloadefl-cf05507bee984bb1435e696ae9e4feafb912ad87.tar.gz
efl_ui_pager: ensure that only valid objects are removed
everything else will just print errors Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D8745
-rw-r--r--src/lib/elementary/efl_ui_pager.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/elementary/efl_ui_pager.c b/src/lib/elementary/efl_ui_pager.c
index c35695e9f7..95ebd1233c 100644
--- a/src/lib/elementary/efl_ui_pager.c
+++ b/src/lib/elementary/efl_ui_pager.c
@@ -586,7 +586,8 @@ _efl_ui_pager_current_page_set(Eo *obj,
Eo *curr;
curr = eina_list_nth(pd->content_list, pd->curr.page);
- efl_pack_unpack(pd->page_box, curr);
+ if (curr)
+ efl_pack_unpack(pd->page_box, curr);
efl_canvas_object_clipper_set(curr, pd->backclip);
pd->curr.page = index;
@@ -821,7 +822,9 @@ _unpack_all(Efl_Ui_Pager_Data *pd,
else
{
subobj = eina_list_nth(pd->content_list, pd->curr.page);
- efl_pack_unpack(pd->page_box, subobj);
+ if (subobj)
+ efl_pack_unpack(pd->page_box, subobj);
+ pd->curr.page = -1;
}
if (clear)
@@ -890,6 +893,7 @@ _unpack(Eo *obj,
if (self_curr_page == self_index)
{
efl_pack_unpack(pd->page_box, subobj);
+ self_curr_page = pd->curr.page;
pd->curr.page = -1;
efl_ui_pager_current_page_set(obj, self_curr_page);
}