sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 3f0b3f8f9b3b737fd0e6d36e2a2c469b07268ec2
parent 4943534929dfd3f0ea55e26241544354f8365e60
Author: Simon Ser <contact@emersion.fr>
Date:   Mon, 14 Apr 2025 09:29:45 +0200

Fix crash on shutdown when Xwayland is disabled

Diffstat:
Msway/server.c | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/sway/server.c b/sway/server.c @@ -496,9 +496,11 @@ void server_fini(struct sway_server *server) { // TODO: free sway-specific resources #if WLR_HAS_XWAYLAND - wl_list_remove(&server->xwayland_surface.link); - wl_list_remove(&server->xwayland_ready.link); - wlr_xwayland_destroy(server->xwayland.wlr_xwayland); + if (server->xwayland.wlr_xwayland != NULL) { + wl_list_remove(&server->xwayland_surface.link); + wl_list_remove(&server->xwayland_ready.link); + wlr_xwayland_destroy(server->xwayland.wlr_xwayland); + } #endif wl_display_destroy_clients(server->wl_display); wlr_backend_destroy(server->backend);