server: don't instantiate a client without a monitor

This commit is contained in:
sewn 2025-02-05 14:23:17 +03:00
parent 2fe72effa9
commit 8de378963b
No known key found for this signature in database

View file

@ -211,6 +211,12 @@ fdm_client(struct fdm *fdm, int fd, int events, void *data)
return true; 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! */ /* All initialization data received - time to instantiate a terminal! */
xassert(client->instance == NULL); xassert(client->instance == NULL);