evas canvas: fix null possibility of evas_object_above_get().

fix null object return when trying to get an object
above the current object and a layer with no objects is present.
probably a layer not being cleaned somewhere.

Reviewed By: Hermet

@fix
This commit is contained in:
Gwanglim Lee 2018-09-13 18:24:35 +09:00 committed by Hermet Park
parent c3f7c58e4e
commit 772759baa2
1 changed files with 5 additions and 5 deletions

View File

@ -5,12 +5,12 @@ evas_object_above_get_internal(const Evas_Object_Protected_Data *obj)
return (Evas_Object_Protected_Data *)((EINA_INLIST_GET(obj))->next);
else
{
if ((EINA_INLIST_GET(obj->layer))->next)
{
Evas_Layer *l;
Evas_Layer *l = (Evas_Layer *)(EINA_INLIST_GET(obj->layer))->next;
l = (Evas_Layer *)((EINA_INLIST_GET(obj->layer))->next);
return l->objects;
for (; l; l = (Evas_Layer *)(EINA_INLIST_GET(l))->next)
{
if (l->objects)
return l->objects;
}
}
return NULL;