From 9e6c0c747be838d1f3dc38c2924a47a42416c081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Mon, 27 Nov 2017 15:54:33 +0100 Subject: [PATCH] X11: Fix segfault when using NVidia EGL --- README.md | 1 + src/x11_init.c | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b8e18a68..595e49ee 100644 --- a/README.md +++ b/README.md @@ -218,6 +218,7 @@ information on what to include when reporting a bug. - [X11] Bugfix: Incremental reading of selections was not supported (#275) - [X11] Bugfix: Selection I/O reported but did not support `COMPOUND_TEXT` - [X11] Bugfix: Latin-1 text read from selections was not converted to UTF-8 +- [X11] Bugfix: NVidia EGL would segfault if unloaded before closing the display - [Linux] Moved to evdev for joystick input (#906,#1005) - [Linux] Bugfix: Event processing did not detect joystick disconnection (#932) - [Linux] Bugfix: The joystick device path could be truncated (#1025) diff --git a/src/x11_init.c b/src/x11_init.c index 4c863c38..6786231c 100644 --- a/src/x11_init.c +++ b/src/x11_init.c @@ -994,8 +994,6 @@ void _glfwPlatformTerminate(void) _glfw.x11.im = NULL; } - _glfwTerminateEGL(); - if (_glfw.x11.display) { XCloseDisplay(_glfw.x11.display); @@ -1026,8 +1024,9 @@ void _glfwPlatformTerminate(void) _glfw.x11.xinerama.handle = NULL; } - // NOTE: This needs to be done after XCloseDisplay, as libGL registers - // cleanup callbacks that get called by it + // NOTE: These need to be unloaded after XCloseDisplay, as they register + // cleanup callbacks that get called by that function + _glfwTerminateEGL(); _glfwTerminateGLX(); #if defined(__linux__)