From 2cb617e9e0c535f1206aad65344691c128c33f2a Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Thu, 12 Aug 2021 14:13:23 -0400 Subject: [PATCH] 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. Part-of: --- 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 d4cd5d10f..84ace613b 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);