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>
This commit is contained in:
committed by
Daniel Stone
parent
89c2f637b9
commit
6a38ad740c
@@ -2760,6 +2760,10 @@ gl_renderer_output_destroy(struct weston_output *output)
|
|||||||
for (i = 0; i < 2; i++)
|
for (i = 0; i < 2; i++)
|
||||||
pixman_region32_fini(&go->buffer_damage[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);
|
weston_platform_destroy_egl_surface(gr->egl_display, go->egl_surface);
|
||||||
|
|
||||||
free(go);
|
free(go);
|
||||||
|
|||||||
Reference in New Issue
Block a user