mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 00:39:30 +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:
@ -315,6 +315,12 @@ clutter_backend_egl_dispose (GObject *gobject)
|
|||||||
ClutterBackendEGL *backend_egl = CLUTTER_BACKEND_EGL (gobject);
|
ClutterBackendEGL *backend_egl = CLUTTER_BACKEND_EGL (gobject);
|
||||||
ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (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)
|
if (backend_egl->dummy_surface != EGL_NO_SURFACE)
|
||||||
{
|
{
|
||||||
eglDestroySurface (backend_egl->edpy, backend_egl->dummy_surface);
|
eglDestroySurface (backend_egl->edpy, backend_egl->dummy_surface);
|
||||||
@ -338,8 +344,6 @@ clutter_backend_egl_dispose (GObject *gobject)
|
|||||||
eglTerminate (backend_egl->edpy);
|
eglTerminate (backend_egl->edpy);
|
||||||
backend_egl->edpy = 0;
|
backend_egl->edpy = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
G_OBJECT_CLASS (clutter_backend_egl_parent_class)->dispose (gobject);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static GObject *
|
static GObject *
|
||||||
|
Reference in New Issue
Block a user