forked from enlightenment/efl
fix crash when trying to get an object below the current object and a layer with no objects is present
probably a layer not being cleaned somewhere, but I can't deal with the crashing
This commit is contained in:
parent
c4c99af1f4
commit
7dfd4581b4
|
@ -26,12 +26,12 @@ evas_object_below_get_internal(const Evas_Object_Protected_Data *obj)
|
|||
return (Evas_Object_Protected_Data *)((EINA_INLIST_GET(obj))->prev);
|
||||
else
|
||||
{
|
||||
if ((EINA_INLIST_GET(obj->layer))->prev)
|
||||
{
|
||||
Evas_Layer *l;
|
||||
Evas_Layer *l = (Evas_Layer *)(EINA_INLIST_GET(obj->layer))->prev;
|
||||
|
||||
l = (Evas_Layer *)((EINA_INLIST_GET(obj->layer))->prev);
|
||||
return (Evas_Object_Protected_Data *)((EINA_INLIST_GET((l->objects)))->last);
|
||||
for (; l; l = (Evas_Layer *)(EINA_INLIST_GET(l))->prev)
|
||||
{
|
||||
if (l->objects)
|
||||
return (Evas_Object_Protected_Data *)((EINA_INLIST_GET((l->objects)))->last);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue