From 525b6bb1d9cca01b100f8aedb533f3ffda190437 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Thu, 24 Aug 2017 19:28:51 +0200 Subject: [PATCH] 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. --- src/lib/evas/canvas/evas_object_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c index 88261ed..d298efb 100644 --- a/src/lib/evas/canvas/evas_object_main.c +++ b/src/lib/evas/canvas/evas_object_main.c @@ -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); } -- 2.7.4