From a1591c23d23c5db265d94f3ba442c57dc8eebd4b Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 8 Dec 2020 16:15:03 +0100 Subject: [PATCH] Handle secondary headless backend failures --- sway/server.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sway/server.c b/sway/server.c index cde8a5a29..ac30b6cff 100644 --- a/sway/server.c +++ b/sway/server.c @@ -173,7 +173,12 @@ bool server_init(struct sway_server *server) { server->headless_backend = wlr_headless_backend_create_with_renderer(server->wl_display, renderer); - wlr_multi_backend_add(server->backend, server->headless_backend); + if (!server->headless_backend) { + sway_log(SWAY_INFO, "Failed to create secondary headless backend, " + "starting without it"); + } else { + wlr_multi_backend_add(server->backend, server->headless_backend); + } // This may have been set already via -Dtxn-timeout if (!server->txn_timeout_ms) {