diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-12-20 05:51:23 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-12-20 05:51:23 -0500 |
commit | ee39dff1e7de4a234f2ff39c1ce2df6bc84abb04 (patch) | |
tree | 11bc54fad4ab8d1b4b6bc4cec0c07fca072ab8d0 /rootston/main.c | |
parent | ca6a0ef1bbbd611c9ebf0ace08b8fc6af3883d09 (diff) |
rootston: handle backend creation failed
Diffstat (limited to 'rootston/main.c')
-rw-r--r-- | rootston/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/rootston/main.c b/rootston/main.c index aa20dbba..2f913272 100644 --- a/rootston/main.c +++ b/rootston/main.c @@ -5,6 +5,7 @@ #include <wayland-server.h> #include <wlr/backend.h> #include <wlr/backend/headless.h> +#include <wlr/backend/multi.h> #include <wlr/render.h> #include <wlr/render/gles2.h> #include <wlr/util/log.h> @@ -32,6 +33,12 @@ int main(int argc, char **argv) { assert(server.backend = wlr_backend_autocreate(server.wl_display)); + if (wlr_multi_is_empty(server.backend)) { + wlr_log(L_ERROR, "could not start backend"); + wlr_backend_destroy(server.backend); + return 1; + } + assert(server.renderer = wlr_gles2_renderer_create(server.backend)); server.data_device_manager = wlr_data_device_manager_create(server.wl_display); |