[Mesa-stable] [PATCH 1/3] egl/wayland: use the destroy_window_callback for swrast

Emil Velikov emil.l.velikov at gmail.com
Fri Nov 11 16:44:59 UTC 2016


From: Emil Velikov <emil.velikov at collabora.com>

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.

Cc: "12.0 13.0" <mesa-stable at lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 src/egl/drivers/dri2/platform_wayland.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index 83abff3..f39dcb9 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -1740,6 +1740,7 @@ 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->resize_callback = resize_callback;
 
    dri2_surf->base.Width = -1;
    dri2_surf->base.Height = -1;
-- 
2.10.2



More information about the mesa-stable mailing list