From 8de378963b90bca1bc932c094a78c683d01019aa Mon Sep 17 00:00:00 2001 From: sewn Date: Wed, 5 Feb 2025 14:23:17 +0300 Subject: [PATCH] server: don't instantiate a client without a monitor --- server.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server.c b/server.c index 78d98d53..5981a14c 100644 --- a/server.c +++ b/server.c @@ -211,6 +211,12 @@ fdm_client(struct fdm *fdm, int fd, int events, void *data) return true; } + if (tll_length(server->wayl->monitors) == 0) { + LOG_ERR("no monitors available for new terminal"); + client_send_exit_code(client, -26); + goto shutdown; + } + /* All initialization data received - time to instantiate a terminal! */ xassert(client->instance == NULL);