summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaeun Choi <jaeun12.choi@samsung.com>2019-01-23 20:57:09 +0900
committerJaeun Choi <jaeun12.choi@samsung.com>2019-01-25 13:47:37 +0900
commit86de58676f6a90f1883560e0133ccf1154f31461 (patch)
treeef2e9551823c960ad8a3d39119b625dafd7ead52
parentb2a0db1d1bce0728e2d152ca5ec9fbd4b5f4aa66 (diff)
efl_ui_pager: add missing conditions in pack before/after function
the functions should return if the 'existing' object is not in the content list
Diffstat (limited to '')
-rw-r--r--src/lib/elementary/efl_ui_pager.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/elementary/efl_ui_pager.c b/src/lib/elementary/efl_ui_pager.c
index c9df2f7317..e89be99720 100644
--- a/src/lib/elementary/efl_ui_pager.c
+++ b/src/lib/elementary/efl_ui_pager.c
@@ -451,9 +451,9 @@ _efl_ui_pager_efl_pack_linear_pack_before(Eo *obj EINA_UNUSED,
451{ 451{
452 if (!EINA_DBL_EQ(pd->curr.pos, 0.0)) return EINA_FALSE; 452 if (!EINA_DBL_EQ(pd->curr.pos, 0.0)) return EINA_FALSE;
453 453
454 int index; 454 int index = eina_list_data_idx(pd->content_list, (void *)existing);
455 if (index == -1) return EINA_FALSE;
455 456
456 index = eina_list_data_idx(pd->content_list, (void *)existing);
457 pd->content_list = eina_list_prepend_relative(pd->content_list, subobj, existing); 457 pd->content_list = eina_list_prepend_relative(pd->content_list, subobj, existing);
458 458
459 pd->cnt += 1; 459 pd->cnt += 1;
@@ -480,9 +480,9 @@ _efl_ui_pager_efl_pack_linear_pack_after(Eo *obj EINA_UNUSED,
480{ 480{
481 if (!EINA_DBL_EQ(pd->curr.pos, 0.0)) return EINA_FALSE; 481 if (!EINA_DBL_EQ(pd->curr.pos, 0.0)) return EINA_FALSE;
482 482
483 int index; 483 int index = eina_list_data_idx(pd->content_list, (void *)existing);
484 if (index == -1) return EINA_FALSE;
484 485
485 index = eina_list_data_idx(pd->content_list, (void *)existing);
486 pd->content_list = eina_list_append_relative(pd->content_list, subobj, existing); 486 pd->content_list = eina_list_append_relative(pd->content_list, subobj, existing);
487 487
488 pd->cnt += 1; 488 pd->cnt += 1;