From 632759a49988e545ae9aff636c2095f295492293 Mon Sep 17 00:00:00 2001 From: emersion Date: Fri, 17 Nov 2017 15:28:22 +0100 Subject: Fix segfault when xwayland is disabled --- rootston/main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'rootston') diff --git a/rootston/main.c b/rootston/main.c index 365ff6e0..814d3aef 100644 --- a/rootston/main.c +++ b/rootston/main.c @@ -58,8 +58,12 @@ int main(int argc, char **argv) { #ifndef HAS_XWAYLAND ready(NULL, NULL); #else - struct wl_listener xwayland_ready = { .notify = ready }; - wl_signal_add(&server.desktop->xwayland->events.ready, &xwayland_ready); + if (server.desktop->xwayland != NULL) { + struct wl_listener xwayland_ready = { .notify = ready }; + wl_signal_add(&server.desktop->xwayland->events.ready, &xwayland_ready); + } else { + ready(NULL, NULL); + } #endif wl_display_run(server.wl_display); -- cgit v1.2.3