In some case, top layer doesn't have valid objects,
That case, we must find and return top object in the next layer.
Change-Id: I3c6fc8a683a1b3673a06f8e544a04809ed3a353e
list = EINA_INLIST_GET(e->layers);
if (!list) return NULL;
- layer = (Evas_Layer *) list->last;
- if (!layer) return NULL;
+ //just in case if layer has no valid objects in the list.
+ EINA_INLIST_REVERSE_FOREACH(list, layer)
+ if (layer->objects) break;
list = EINA_INLIST_GET(layer->objects);
if (!list) return NULL;