eo: if the pointer is incorrect, goto to the error handler.

This commit is contained in:
Cedric BAIL 2018-04-09 16:53:28 -07:00
parent 8f17ab22ac
commit 79afb51626
1 changed files with 2 additions and 1 deletions

View File

@ -666,6 +666,8 @@ _efl_object_parent_set(Eo *obj, Efl_Object_Data *pd, Eo *parent_id)
((parent_id) && (!_eo_id_domain_compatible(parent_id, obj))))
return;
EO_OBJ_POINTER_GOTO(obj, eo_obj, err_impossible);
// Invalidated object can not be bring back to life
if (pd->invalidate)
{
@ -673,7 +675,6 @@ _efl_object_parent_set(Eo *obj, Efl_Object_Data *pd, Eo *parent_id)
return ;
}
EO_OBJ_POINTER(obj, eo_obj);
if (pd->parent)
{
Efl_Object_Data *old_parent_pd = efl_data_scope_get(pd->parent,