diff options
-rw-r--r-- | render/gles2/renderer.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c index 6ae5e843..2a78eb3e 100644 --- a/render/gles2/renderer.c +++ b/render/gles2/renderer.c @@ -674,7 +674,6 @@ static void gles2_destroy(struct wlr_renderer *wlr_renderer) { struct wlr_gles2_renderer *renderer = gles2_get_renderer(wlr_renderer); wlr_egl_make_current(renderer->egl, EGL_NO_SURFACE, NULL); - wlr_egl_finish(renderer->egl); struct wlr_gles2_buffer *buffer, *buffer_tmp; wl_list_for_each_safe(buffer, buffer_tmp, &renderer->buffers, link) { @@ -696,6 +695,9 @@ static void gles2_destroy(struct wlr_renderer *wlr_renderer) { wlr_egl_unset_current(renderer->egl); + wlr_egl_finish(renderer->egl); + free(renderer->egl); + if (renderer->drm_fd >= 0) { close(renderer->drm_fd); } |