aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-08-24 18:55:11 +0200
committerdec05eba <dec05eba@protonmail.com>2024-08-24 18:55:11 +0200
commit2ac81cce3e232e97eee94416ee92f41dd018b651 (patch)
tree57d5cb87fa2bf2279462f9ba07b69e85cf51ae35
parent6af3b55b9a11cf85e850eba0fddcf531e2002c7f (diff)
Add missing cleanup for egl context
-rw-r--r--src/window/window.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/window/window.c b/src/window/window.c
index 6d44dad..d3ec04e 100644
--- a/src/window/window.c
+++ b/src/window/window.c
@@ -292,6 +292,16 @@ static bool egl_context_choose(mgl_context *context, x11_context_egl *egl, bool
static void x11_context_egl_deinit(x11_context_egl *self) {
mgl_context *context = mgl_get_context();
+ if(self->visual_info) {
+ XFree(self->visual_info);
+ self->visual_info = NULL;
+ }
+
+ if(self->configs) {
+ free(self->configs);
+ self->configs = NULL;
+ }
+
if(self->egl_context) {
context->gl.eglMakeCurrent(self->egl_display, NULL, NULL, NULL);
context->gl.eglDestroyContext(self->egl_display, self->egl_context);