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,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;
|
||||
|
|
Loading…
Reference in New Issue