aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Manuel Stoeckl <code@mstoeckl.com>2023-09-09 17:02:55 -0400
committerLibravatar Simon Ser <contact@emersion.fr>2023-09-10 08:33:10 +0900
commit8edc48f6dd8f401ac36ee529facc6c6859d9b8d3 (patch)
tree3c99c9e96cdc65744f1e3a97a786a2a21fc02e57
parenti3 compat: Adding support for the `all` criteria (diff)
downloadsway-8edc48f6dd8f401ac36ee529facc6c6859d9b8d3.tar.gz
sway-8edc48f6dd8f401ac36ee529facc6c6859d9b8d3.tar.zst
sway-8edc48f6dd8f401ac36ee529facc6c6859d9b8d3.zip
sway/server: Fix null pointer crash when Xwayland disabled
-rw-r--r--sway/server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/server.c b/sway/server.c
index db873dca..ba5c2a0c 100644
--- a/sway/server.c
+++ b/sway/server.c
@@ -78,7 +78,7 @@ static bool filter_global(const struct wl_client *client,
78 const struct wl_global *global, void *data) { 78 const struct wl_global *global, void *data) {
79#if HAVE_XWAYLAND 79#if HAVE_XWAYLAND
80 struct wlr_xwayland *xwayland = server.xwayland.wlr_xwayland; 80 struct wlr_xwayland *xwayland = server.xwayland.wlr_xwayland;
81 if (global == xwayland->shell_v1->global) { 81 if (xwayland && global == xwayland->shell_v1->global) {
82 return xwayland->server != NULL && client == xwayland->server->client; 82 return xwayland->server != NULL && client == xwayland->server->client;
83 } 83 }
84#endif 84#endif