mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
clutter-backend-egl: Chain up in dispose before destroying the context
clutter_backend_egl_dispose now chains up before disposing its own resources so that ClutterBackendX11 will destroy all of the stages before we destroy the egl context. Otherwise the actors may try to make GL calls during destruction which causes a crash.
This commit is contained in:
parent
6c3d1cfab9
commit
4b239e1fe8
@ -315,6 +315,12 @@ clutter_backend_egl_dispose (GObject *gobject)
|
||||
ClutterBackendEGL *backend_egl = CLUTTER_BACKEND_EGL (gobject);
|
||||
ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (gobject);
|
||||
|
||||
/* We chain up before disposing our own resources so that
|
||||
ClutterBackendX11 will destroy all of the stages before we
|
||||
destroy the egl context. Otherwise the actors may try to make GL
|
||||
calls during destruction which causes a crash */
|
||||
G_OBJECT_CLASS (clutter_backend_egl_parent_class)->dispose (gobject);
|
||||
|
||||
if (backend_egl->dummy_surface != EGL_NO_SURFACE)
|
||||
{
|
||||
eglDestroySurface (backend_egl->edpy, backend_egl->dummy_surface);
|
||||
@ -338,8 +344,6 @@ clutter_backend_egl_dispose (GObject *gobject)
|
||||
eglTerminate (backend_egl->edpy);
|
||||
backend_egl->edpy = 0;
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (clutter_backend_egl_parent_class)->dispose (gobject);
|
||||
}
|
||||
|
||||
static GObject *
|
||||
|
Loading…
Reference in New Issue
Block a user