Commit 6a38ad74 authored by Dima Ryazanov's avatar Dima Ryazanov Committed by Daniel Stone

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's avatarDima Ryazanov <dima@gmail.com>
Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
parent 89c2f637
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment