enlightenment: Ensure we have a valid menu comp object before calling

Summary:
evas functions

This fixes an issue when quickly mousing through menus can cause a
segfault in Enlightenment due to menu->comp_object being NULL

ref T7030

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric

Tags: #efl, #enlightenment22

Maniphest Tasks: T7030

Differential Revision: https://phab.enlightenment.org/D6641
This commit is contained in:
Chris Michael 2018-07-25 14:59:36 -04:00 committed by Mike Blumenkrantz
parent ae64aabfa2
commit 5af9485c4f
1 changed files with 7 additions and 3 deletions

View File

@ -1175,10 +1175,14 @@ e_menu_idler_before(void)
/* phase 4. de-activate... */
EINA_LIST_REVERSE_FOREACH(_e_active_menus, l, m)
{
if ((!m->active) && (!evas_object_visible_get(m->comp_object)))
if (!m->active)
{
_e_menu_unrealize(m);
removals = eina_list_append(removals, m);
if ((m->realized) &&
(!evas_object_visible_get(m->comp_object)))
{
_e_menu_unrealize(m);
removals = eina_list_append(removals, m);
}
}
}
EINA_LIST_FREE(removals, m)