From 8b9221d845e4ae9b314f07375cc3a520ba8d98d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Wed, 25 Apr 2018 21:49:41 +0200 Subject: [PATCH] X11: Fix missing dlclose calls for X extensions --- src/x11_init.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/x11_init.c b/src/x11_init.c index af4fb7ed..bff90e7c 100644 --- a/src/x11_init.c +++ b/src/x11_init.c @@ -1024,6 +1024,24 @@ void _glfwPlatformTerminate(void) _glfw.x11.xinerama.handle = NULL; } + if (_glfw.x11.xrender.handle) + { + _glfw_dlclose(_glfw.x11.xrender.handle); + _glfw.x11.xrender.handle = NULL; + } + + if (_glfw.x11.vidmode.handle) + { + _glfw_dlclose(_glfw.x11.vidmode.handle); + _glfw.x11.vidmode.handle = NULL; + } + + if (_glfw.x11.xi.handle) + { + _glfw_dlclose(_glfw.x11.xi.handle); + _glfw.x11.xi.handle = NULL; + } + // NOTE: These need to be unloaded after XCloseDisplay, as they register // cleanup callbacks that get called by that function _glfwTerminateEGL();