diff options
author | Emil Velikov <emil.velikov@collabora.com> | 2016-11-28 18:25:18 +0000 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2017-01-24 01:13:31 +0000 |
commit | ced6fd3508bd32b3dc3eb8c1068dbeca84c953cb (patch) | |
tree | 546c805b2d1d5b760011a0b2d3cbc245c3faaf48 | |
parent | 5dd74b9c404278d3eaa4037be65e633388c95866 (diff) |
egl/wayland: use the destroy_window_callback for swrast
As described in commit 690ead4a135 ("egl/wayland-egl: Fix for segfault
in dri2_wl_destroy_surface.") if we attempt to destroy a EGL surface
attached to already destroyed Wayland window we'll get a segfault.
v2: set the correct callback alongside the window->private. (Dan)
Cc: Daniel Stone <daniels@collabora.com>
Cc: "12.0 13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
(cherry picked from commit bfd63143502ff03ceae903f959a6f41666b849bc)
-rw-r--r-- | src/egl/drivers/dri2/platform_wayland.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index b479e0d77ab..5b72b4a6df0 100644 --- a/src/egl/drivers/dri2/platform_wayland.c +++ b/src/egl/drivers/dri2/platform_wayland.c @@ -1744,6 +1744,8 @@ dri2_wl_swrast_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp, dri2_surf->format = WL_SHM_FORMAT_ARGB8888; dri2_surf->wl_win = window; + dri2_surf->wl_win->private = dri2_surf; + dri2_surf->wl_win->destroy_window_callback = destroy_window_callback; dri2_surf->base.Width = -1; dri2_surf->base.Height = -1; |