From b5a2bb18cf1acb7e961d52562acecc9bff7212dc Mon Sep 17 00:00:00 2001 From: ninja- Date: Tue, 30 Jun 2020 19:41:57 +0200 Subject: [PATCH] wayland: fix decorations unref crash --- src/wl_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wl_init.c b/src/wl_init.c index 3ffd966e7..d5718d10e 100644 --- a/src/wl_init.c +++ b/src/wl_init.c @@ -1310,7 +1310,8 @@ void _glfwPlatformTerminate(void) if (_glfw.wl.shm) wl_shm_destroy(_glfw.wl.shm); #ifdef WITH_DECORATION - libdecor_unref(_glfw.wl.csd_context); + if (_glfw.wl.csd_context) + libdecor_unref(_glfw.wl.csd_context); #else if (_glfw.wl.viewporter) wp_viewporter_destroy(_glfw.wl.viewporter);