forked from enlightenment/efl
evas_object_main: fallback to other usage instead of returning NULL
Even if a object is on deleting or doesnt have a layer, it still can be found in a higher hirachy.
This commit is contained in:
parent
425c98289d
commit
525b6bb1d9
|
@ -2180,11 +2180,12 @@ _efl_canvas_object_efl_object_provider_find(Eo *eo_obj EINA_UNUSED, Evas_Object_
|
||||||
{
|
{
|
||||||
if (klass == EVAS_CANVAS_CLASS)
|
if (klass == EVAS_CANVAS_CLASS)
|
||||||
{
|
{
|
||||||
if ((obj->delete_me) || (!obj->layer)) return NULL;
|
if ((obj->delete_me) || (!obj->layer)) goto fallback;
|
||||||
return obj->layer->evas->evas;
|
return obj->layer->evas->evas;
|
||||||
}
|
}
|
||||||
else if (klass == EFL_LOOP_CLASS)
|
else if (klass == EFL_LOOP_CLASS)
|
||||||
return ecore_main_loop_get();
|
return ecore_main_loop_get();
|
||||||
|
fallback:
|
||||||
return efl_provider_find(efl_super(eo_obj, MY_CLASS), klass);
|
return efl_provider_find(efl_super(eo_obj, MY_CLASS), klass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue