From def63f9a564d75caa6a43092b371da8ddca8b5d2 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Sat, 7 Mar 2020 20:06:25 +0000 Subject: [PATCH] glx: make sure the context is really destroyed GLX context is released when it's no longer current in any threads, so we have to release the context before destroy it. Signed-off-by: Yuxuan Shui --- src/backend/gl/glx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/backend/gl/glx.c b/src/backend/gl/glx.c index 5117e2f..9303a98 100644 --- a/src/backend/gl/glx.c +++ b/src/backend/gl/glx.c @@ -198,6 +198,7 @@ void glx_deinit(backend_t *base) { // Destroy GLX context if (gd->ctx) { + glXMakeCurrent(gd->display, None, NULL); glXDestroyContext(gd->display, gd->ctx); gd->ctx = 0; }