From e8de264b754ad282c3697fafddb5358716ab415b Mon Sep 17 00:00:00 2001 From: Brandon Wright Date: Sat, 17 Mar 2018 19:45:01 -0500 Subject: [PATCH] Fix X11 Vulkan bug from Wayland driver. --- gfx/drivers_context/wayland_ctx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c index 9357759c2f..0b5e3d7a26 100644 --- a/gfx/drivers_context/wayland_ctx.c +++ b/gfx/drivers_context/wayland_ctx.c @@ -545,7 +545,7 @@ static void gfx_ctx_wl_destroy_resources(gfx_ctx_wayland_data_t *wl) #ifdef HAVE_VULKAN vulkan_context_destroy(&wl->vk, wl->surface); - if (wl->input.fd >= 0) + if (wl->input.dpy != NULL && wl->input.fd >= 0) close(wl->input.fd); #endif break;