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:
Marcel Hollerbach 2017-08-24 19:28:51 +02:00
parent 425c98289d
commit 525b6bb1d9
1 changed files with 2 additions and 1 deletions

View File

@ -2180,11 +2180,12 @@ _efl_canvas_object_efl_object_provider_find(Eo *eo_obj EINA_UNUSED, Evas_Object_
{
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;
}
else if (klass == EFL_LOOP_CLASS)
return ecore_main_loop_get();
fallback:
return efl_provider_find(efl_super(eo_obj, MY_CLASS), klass);
}