canvas layer: +prevent null layer objects.
This commit is contained in:
parent
052f562c42
commit
ed9ab21fdf
|
@ -402,18 +402,20 @@ _evas_canvas_object_top_get(const Eo *eo_e EINA_UNUSED, Evas_Public_Data *e)
|
||||||
|
|
||||||
//just in case if layer has no valid objects in the list.
|
//just in case if layer has no valid objects in the list.
|
||||||
EINA_INLIST_REVERSE_FOREACH(list, layer)
|
EINA_INLIST_REVERSE_FOREACH(list, layer)
|
||||||
if (layer->objects) break;
|
|
||||||
|
|
||||||
list = EINA_INLIST_GET(layer->objects);
|
|
||||||
if (!list) return NULL;
|
|
||||||
|
|
||||||
obj = (Evas_Object_Protected_Data *) list->last;
|
|
||||||
if (!obj) return NULL;
|
|
||||||
|
|
||||||
while (obj)
|
|
||||||
{
|
{
|
||||||
if (!obj->delete_me) return obj->object;
|
if (!layer->objects) continue;
|
||||||
obj = evas_object_below_get_internal(obj);
|
|
||||||
|
list = EINA_INLIST_GET(layer->objects);
|
||||||
|
if (!list) return NULL;
|
||||||
|
|
||||||
|
obj = (Evas_Object_Protected_Data *) list->last;
|
||||||
|
if (!obj) return NULL;
|
||||||
|
|
||||||
|
while (obj)
|
||||||
|
{
|
||||||
|
if (!obj->delete_me) return obj->object;
|
||||||
|
obj = evas_object_below_get_internal(obj);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue