canvas layer: +prevent null layer objects.

This commit is contained in:
Hermet Park 2020-04-24 21:11:27 +09:00
parent 052f562c42
commit ed9ab21fdf
1 changed files with 13 additions and 11 deletions

View File

@ -402,7 +402,8 @@ _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.
EINA_INLIST_REVERSE_FOREACH(list, layer)
if (layer->objects) break;
{
if (!layer->objects) continue;
list = EINA_INLIST_GET(layer->objects);
if (!list) return NULL;
@ -415,6 +416,7 @@ _evas_canvas_object_top_get(const Eo *eo_e EINA_UNUSED, Evas_Public_Data *e)
if (!obj->delete_me) return obj->object;
obj = evas_object_below_get_internal(obj);
}
}
return NULL;
}