mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-07 07:40:30 +01:00
egl/dri2: only destroy created objects
dri2_display_destroy may be called by dri2_initialize_wayland_drm() if
initialization fails. In this case, these objects may not be initialized.
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit 81d5c31631)
This commit is contained in:
parent
2b0e70e2ae
commit
9ffe4cc6c0
1 changed files with 6 additions and 3 deletions
|
|
@ -945,9 +945,12 @@ dri2_display_destroy(_EGLDisplay *disp)
|
|||
zwp_linux_dmabuf_v1_destroy(dri2_dpy->wl_dmabuf);
|
||||
if (dri2_dpy->wl_shm)
|
||||
wl_shm_destroy(dri2_dpy->wl_shm);
|
||||
wl_registry_destroy(dri2_dpy->wl_registry);
|
||||
wl_event_queue_destroy(dri2_dpy->wl_queue);
|
||||
wl_proxy_wrapper_destroy(dri2_dpy->wl_dpy_wrapper);
|
||||
if (dri2_dpy->wl_registry)
|
||||
wl_registry_destroy(dri2_dpy->wl_registry);
|
||||
if (dri2_dpy->wl_queue)
|
||||
wl_event_queue_destroy(dri2_dpy->wl_queue);
|
||||
if (dri2_dpy->wl_dpy_wrapper)
|
||||
wl_proxy_wrapper_destroy(dri2_dpy->wl_dpy_wrapper);
|
||||
u_vector_finish(&dri2_dpy->wl_modifiers.argb8888);
|
||||
u_vector_finish(&dri2_dpy->wl_modifiers.xrgb8888);
|
||||
u_vector_finish(&dri2_dpy->wl_modifiers.rgb565);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue