mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 14:10:09 +01:00
egl/wayland: use the destroy_window_callback for swrast
As described in commit690ead4a13("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 commitbfd6314350)
This commit is contained in:
parent
cc2894d376
commit
689ca381b5
1 changed files with 2 additions and 0 deletions
|
|
@ -1706,6 +1706,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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue