[mutter/fix--replace: 3/3] backend: Clean up renderer after clutter backend




commit f28284d254186190f1317ef7e5d2819488ef09da
Author: Ray Strode <rstrode redhat com>
Date:   Thu Aug 12 14:13:23 2021 -0400

    backend: Clean up renderer after clutter backend
    
    commit c4a73e795020722eda3e2bec0c16d96f9f37333b added
    code to cleanup the renderer when the meta backend is
    disposed. Unfortunately, this introduced a crash when
    the window manager is replaced.
    
    This is because cleaning up the renderer involves talking
    to the X server over a display connection that's closed
    two lines higher as part of the clutter_backend_destroy
    call.
    
    This commit fixes the crash by swapping their order.

 src/backends/meta-backend.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/backends/meta-backend.c b/src/backends/meta-backend.c
index d4cd5d10fc..84ace613bc 100644
--- a/src/backends/meta-backend.c
+++ b/src/backends/meta-backend.c
@@ -254,9 +254,9 @@ meta_backend_dispose (GObject *object)
 
   g_clear_pointer (&priv->default_seat, clutter_seat_destroy);
   g_clear_pointer (&priv->stage, clutter_actor_destroy);
-  g_clear_pointer (&priv->clutter_backend, clutter_backend_destroy);
   g_clear_pointer (&priv->idle_manager, meta_idle_manager_free);
   g_clear_object (&priv->renderer);
+  g_clear_pointer (&priv->clutter_backend, clutter_backend_destroy);
   g_clear_list (&priv->gpus, g_object_unref);
 
   G_OBJECT_CLASS (meta_backend_parent_class)->dispose (object);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]