diff options
author | emersion <contact@emersion.fr> | 2018-05-09 20:05:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-09 20:05:10 +0100 |
commit | 94cf3f1b17c7e9a6f8d6d107ccb6ae2fc7c7079b (patch) | |
tree | 67f4c84722c4af822969fea1ed87897c50cae7b3 /sway | |
parent | 7d707e6865cb123018157582f673711f20cda2f2 (diff) | |
parent | 4ebd6f35070ba5a9a84f279dbe854613f415d468 (diff) |
Merge pull request #1947 from dlrobertson/fix_null_deref
Fix null deref in server_init
Diffstat (limited to 'sway')
-rw-r--r-- | sway/server.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/server.c b/sway/server.c index 2793ca70..8c41ee87 100644 --- a/sway/server.c +++ b/sway/server.c @@ -48,6 +48,10 @@ bool server_init(struct sway_server *server) { server->wl_event_loop = wl_display_get_event_loop(server->wl_display); server->backend = wlr_backend_autocreate(server->wl_display); + if (!server->backend) { + wlr_log(L_ERROR, "Unable to create backend"); + return false; + } struct wlr_renderer *renderer = wlr_backend_get_renderer(server->backend); assert(renderer); |