egl/wayland: use the destroy_window_callback for swrast
authorEmil Velikov <emil.velikov@collabora.com>
Mon, 28 Nov 2016 18:25:18 +0000 (18:25 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 18 Jan 2017 16:01:14 +0000 (16:01 +0000)
commitbfd63143502ff03ceae903f959a6f41666b849bc
treedf6399ee1a64dd034f450b7380f5fa9dd212bdb5
parent3ecd6c6abdf16b3639ee741dde234c85747dcaf2
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>
src/egl/drivers/dri2/platform_wayland.c