From cf5ae4aad92e07f6c16d9dd006196c4b0aab8155 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Wed, 23 Aug 2023 19:27:15 +0000 Subject: [PATCH] internal/egl: call eglTerminate after context release Without eglTerminate, using EGL will crash or report spurious errors after creating and destroying enough contexts. The test program in #528 takes 5-10 window cycles before errors show up for me. Fixes: https://todo.sr.ht/~eliasnaur/gio/528 Signed-off-by: Elias Naur --- internal/egl/egl.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/egl/egl.go b/internal/egl/egl.go index 7d7b5512..90dd9009 100644 --- a/internal/egl/egl.go +++ b/internal/egl/egl.go @@ -62,6 +62,7 @@ func (c *Context) Release() { eglDestroyContext(c.disp, c.eglCtx.ctx) c.eglCtx = nil } + eglTerminate(c.disp) c.disp = nilEGLDisplay }