forked from enlightenment/efl
efl_ui_collection: fix the insertion of the first element with pack_at
Summary: before pack_at with no element failed because the list element has been NULL. This fixes the insertion, the codepath also works without the error. Depends on D9871 Reviewers: zmike, cedric Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9890
This commit is contained in:
parent
ad6300aa48
commit
5d5128b226
|
@ -854,7 +854,8 @@ _efl_ui_collection_efl_pack_linear_pack_at(Eo *obj, Efl_Ui_Collection_Data *pd,
|
|||
clamp = clamp_index(pd, index);
|
||||
index = index_adjust(pd, index);
|
||||
subobj_list = eina_list_nth_list(pd->items, index);
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(subobj_list, EINA_FALSE);
|
||||
if (pd->items)
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(subobj_list, EINA_FALSE);
|
||||
if (!register_item(obj, pd, subobj))
|
||||
return EINA_FALSE;
|
||||
if (clamp == 0)
|
||||
|
|
Loading…
Reference in New Issue