forked from enlightenment/efl
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:
parent
c3f7c58e4e
commit
772759baa2
|
@ -5,11 +5,11 @@ evas_object_above_get_internal(const Evas_Object_Protected_Data *obj)
|
||||||
return (Evas_Object_Protected_Data *)((EINA_INLIST_GET(obj))->next);
|
return (Evas_Object_Protected_Data *)((EINA_INLIST_GET(obj))->next);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((EINA_INLIST_GET(obj->layer))->next)
|
Evas_Layer *l = (Evas_Layer *)(EINA_INLIST_GET(obj->layer))->next;
|
||||||
{
|
|
||||||
Evas_Layer *l;
|
|
||||||
|
|
||||||
l = (Evas_Layer *)((EINA_INLIST_GET(obj->layer))->next);
|
for (; l; l = (Evas_Layer *)(EINA_INLIST_GET(l))->next)
|
||||||
|
{
|
||||||
|
if (l->objects)
|
||||||
return l->objects;
|
return l->objects;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue