aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);