Summary:
A parent surface can be destroyed. In this case, ec->comp_data->sub.data->parent has
a wrong address which has already destroyed. Then, it occurs segmentation fault.
To avoid segfault, ec->comp_data->sub.data->parent should be NULL when a parent surface
is destroyed.
Signed-off-by: Boram Park <boram1288.park@samsung.com>
Test Plan: Run attached test program(subsurface)
Reviewers: gwanglim, cedric, devilhorns, zmike
Reviewed By: devilhorns, zmike
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2484
{
/* Eina_Rectangle *dmg; */
struct wl_resource *cb;
+ E_Client *subc;
/* make sure this is a wayland client */
if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return;
e_pixmap_parent_window_set(ec->pixmap, 0);
}
+ /* remove sub list */
+ EINA_LIST_FREE(ec->comp_data->sub.list, subc)
+ subc->comp_data->sub.data->parent = NULL;
+
if ((ec->parent) && (ec->parent->modal == ec))
{
ec->parent->lock_close = EINA_FALSE;