From fb3bebedd5e165f68b7d6f6e222f7099230c17a1 Mon Sep 17 00:00:00 2001 From: Manuel Stoeckl Date: Sat, 9 Sep 2023 17:02:55 -0400 Subject: [PATCH] sway/server: Fix null pointer crash when Xwayland disabled --- sway/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sway/server.c b/sway/server.c index db873dcae..ba5c2a0ce 100644 --- a/sway/server.c +++ b/sway/server.c @@ -78,7 +78,7 @@ static bool filter_global(const struct wl_client *client, const struct wl_global *global, void *data) { #if HAVE_XWAYLAND struct wlr_xwayland *xwayland = server.xwayland.wlr_xwayland; - if (global == xwayland->shell_v1->global) { + if (xwayland && global == xwayland->shell_v1->global) { return xwayland->server != NULL && client == xwayland->server->client; } #endif