aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2017-08-27 11:20:28 +0100
committerEmil Velikov <[email protected]>2017-08-29 13:41:06 +0100
commit1a8015e753c6f52b24a473ea60e3ce0b38de7d42 (patch)
treefc2dfd300ceb59be8a7bcc845ad767c40a6c05dd /src
parent83442112d7136b6d0c2f6d84c409c04664aeb154 (diff)
egl/wayland: polish object teardown in dri2_wl_destroy_surface
The wl_drm wrapper is created before the wl display/surface ones. Thus make sure we destroy it after them. In reality it should not make any difference either way. Fixes: 03dd9a88b0b ("egl/wayland: Use per-surface event queues") Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/egl/drivers/dri2/platform_wayland.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index 05263fe99da..754ce6c3990 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -293,10 +293,10 @@ dri2_wl_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
dri2_surf->wl_win->destroy_window_callback = NULL;
}
- if (dri2_surf->wl_drm_wrapper)
- wl_proxy_wrapper_destroy(dri2_surf->wl_drm_wrapper);
wl_proxy_wrapper_destroy(dri2_surf->wl_surface_wrapper);
wl_proxy_wrapper_destroy(dri2_surf->wl_dpy_wrapper);
+ if (dri2_surf->wl_drm_wrapper)
+ wl_proxy_wrapper_destroy(dri2_surf->wl_drm_wrapper);
wl_event_queue_destroy(dri2_surf->wl_queue);
free(surf);