gl-renderer: Fix an invalid write when closing a Weston window

Call eglMakeCurrent before destroying the native EGL window, similar to what
other sample clients are already doing.

Signed-off-by: Dima Ryazanov <dima@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
dev
Dima Ryazanov 8 years ago committed by Daniel Stone
parent 89c2f637b9
commit 6a38ad740c
  1. 4
      libweston/gl-renderer.c

@ -2760,6 +2760,10 @@ gl_renderer_output_destroy(struct weston_output *output)
for (i = 0; i < 2; i++)
pixman_region32_fini(&go->buffer_damage[i]);
eglMakeCurrent(gr->egl_display,
EGL_NO_SURFACE, EGL_NO_SURFACE,
EGL_NO_CONTEXT);
weston_platform_destroy_egl_surface(gr->egl_display, go->egl_surface);
free(go);

Loading…
Cancel
Save