efl_wl: destroy extant shell surface upon surface deletion

avoid invalid reads later

@fix
This commit is contained in:
Mike Blumenkrantz 2017-10-18 17:11:36 -04:00
parent 6006fab98d
commit c7f9f2eef1
1 changed files with 6 additions and 0 deletions

View File

@ -2301,6 +2301,12 @@ comp_surface_smart_del(Evas_Object *obj)
}
evas_object_del(cs->img);
evas_object_del(cs->clip);
if (cs->shell.surface)
{
if (cs->role)
wl_resource_destroy(cs->role);
wl_resource_destroy(cs->shell.surface);
}
cs->c->surfaces = eina_inlist_remove(cs->c->surfaces, EINA_INLIST_GET(cs));
cs->c->surfaces_count--;
free(cs);