From 5f5f31939d98d4044ae9e3a2d3bcc3066ec1e688 Mon Sep 17 00:00:00 2001 From: Ander Conselvan de Oliveira Date: Mon, 30 Apr 2012 13:31:28 +0300 Subject: [PATCH] compositor-drm: call EGL cleanup functions on exit --- src/compositor-drm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index dcd5e996..e7433f76 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -1578,6 +1578,12 @@ drm_destroy(struct weston_compositor *ec) weston_compositor_shutdown(ec); + /* Work around crash in egl_dri2.c's dri2_make_current() */ + eglMakeCurrent(ec->display, EGL_NO_SURFACE, EGL_NO_SURFACE, + EGL_NO_CONTEXT); + eglTerminate(ec->display); + eglReleaseThread(); + gbm_device_destroy(d->gbm); destroy_sprites(d); if (weston_launcher_drm_set_master(&d->base, d->drm.fd, 0) < 0)