From cf4734ce8a5fbdfc3623f3842bafd2437045d8e1 Mon Sep 17 00:00:00 2001 From: er-azh <80633916+er-azh@users.noreply.github.com> Date: Thu, 25 Jul 2024 03:17:43 -0400 Subject: [PATCH] X11: Fix detectEWMH not releasing error handler If detectEWMH failed to query the EWMH helper window, it would return without restoring the previous Xlib error handler. This was bad (because other code might also be using the facility) and bad (because GLFW would assert the next time it tried to grab the error handler). This commit adds the necessary release call. Closes #2593 Fixes #2601 Closes #2631 --- src/x11_init.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/x11_init.c b/src/x11_init.c index 982c526c..6b34c263 100644 --- a/src/x11_init.c +++ b/src/x11_init.c @@ -535,6 +535,7 @@ static void detectEWMH(void) XA_WINDOW, (unsigned char**) &windowFromChild)) { + _glfwReleaseErrorHandlerX11(); XFree(windowFromRoot); return; }