e_comp_wl: fix segfault in case parent's surface is destroyed before subsurface is... 24/39124/1 accepted/tizen/common/20150511.125739 accepted/tizen/mobile/20150511.133142 accepted/tizen/tv/20150512.050503 accepted/tizen/wearable/20150511.132738 submit/tizen/20150511.051957
authorBoram Park <boram1288.park@samsung.com>
Sat, 9 May 2015 02:48:08 +0000 (11:48 +0900)
committerBoram Park <boram1288.park@samsung.com>
Sat, 9 May 2015 02:48:08 +0000 (11:48 +0900)
Change-Id: I4a46eba98d2d707af4bb232c3c299596529b7626

src/bin/e_comp_wl.c

index a1b116e2e5e70bdc291ac6359039c052ea02a570..43c7938409bed25f055ba53f684b8c014ef80535 100644 (file)
@@ -2326,6 +2326,8 @@ _e_comp_wl_client_cb_del(void *data EINA_UNUSED, E_Client *ec)
 {
    /* Eina_Rectangle *dmg; */
    struct wl_resource *cb;
+   E_Client *subc;
+   Eina_List *l;
 
    /* make sure this is a wayland client */
    if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return;
@@ -2340,6 +2342,11 @@ _e_comp_wl_client_cb_del(void *data EINA_UNUSED, E_Client *ec)
         e_pixmap_parent_window_set(ec->pixmap, 0);
      }
 
+   /* remove sub list */
+   EINA_LIST_FOREACH(ec->comp_data->sub.list, l, subc)
+     subc->comp_data->sub.data->parent = NULL;
+   eina_list_free(ec->comp_data->sub.list);
+
    if ((ec->parent) && (ec->parent->modal == ec))
      {
         ec->parent->lock_close = EINA_FALSE;