diff options
author | emersion <contact@emersion.fr> | 2017-11-17 15:28:22 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2017-11-17 15:28:22 +0100 |
commit | 632759a49988e545ae9aff636c2095f295492293 (patch) | |
tree | 333beb0a5d7345d6cf99d6faea57949ca6c8950b /rootston | |
parent | 10f3be73843250c400531873b4dd27dba44919fd (diff) |
Fix segfault when xwayland is disabled
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/main.c | 8 |
1 files changed, 6 insertions, 2 deletions
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); |