efl_loop_user: error if parent is not a loop provider.

it was silently ignoring the parent, which led me to hours trying to
investigate why my code wasn't working just to realize my parent
wasn't being assigned and refcounts were screwed.
This commit is contained in:
Gustavo Sverzut Barbieri 2016-08-18 01:01:25 -03:00
parent e3e0a6bd65
commit c88b027dc1
1 changed files with 4 additions and 1 deletions

View File

@ -21,7 +21,10 @@ static void
_efl_loop_user_efl_object_parent_set(Eo *obj, Efl_Loop_User_Data *pd EINA_UNUSED, Efl_Object *parent)
{
if (parent != NULL && efl_provider_find(parent, EFL_LOOP_CLASS) == NULL)
return ;
{
ERR("parent=%p is not a provider of EFL_LOOP_CLASS!", parent);
return;
}
efl_parent_set(efl_super(obj, EFL_LOOP_USER_CLASS), parent);
}