[mutter] main: Avoid calling meta_wayland_compositor_get_default() on X11
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] main: Avoid calling meta_wayland_compositor_get_default() on X11
- Date: Wed, 2 Jun 2021 09:20:34 +0000 (UTC)
commit ea626a50594513faa86174ae7dd58101d7c8dd2d
Author: Daniel van Vugt <daniel van vugt canonical com>
Date: Wed Jun 2 16:45:04 2021 +0800
main: Avoid calling meta_wayland_compositor_get_default() on X11
Because it contains an assertion that will fail, and crash.
Started in 301d2c55c6.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1883>
src/core/main.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/core/main.c b/src/core/main.c
index b7b5d14490..3d82773ba6 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -309,13 +309,16 @@ meta_finalize (void)
MetaDisplay *display = meta_get_display ();
MetaBackend *backend = meta_get_backend ();
#ifdef HAVE_WAYLAND
- MetaWaylandCompositor *compositor = meta_wayland_compositor_get_default ();
+ MetaWaylandCompositor *compositor = NULL;
#endif
if (backend)
meta_backend_prepare_shutdown (backend);
#ifdef HAVE_WAYLAND
+ if (meta_is_wayland_compositor ())
+ compositor = meta_wayland_compositor_get_default ();
+
if (compositor)
meta_wayland_compositor_prepare_shutdown (compositor);
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]