Skip to content

Commit

Permalink
X11: Fix missing dlclose calls for X extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
elmindreda committed Apr 25, 2018
1 parent 50eccd2 commit 8b9221d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/x11_init.c
Expand Up @@ -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();
Expand Down

0 comments on commit 8b9221d

Please sign in to comment.