Fix segfault when xwayland is disabled

This commit is contained in:
emersion 2017-11-17 15:28:22 +01:00
parent 10f3be7384
commit 632759a499
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48

View file

@ -58,8 +58,12 @@ int main(int argc, char **argv) {
#ifndef HAS_XWAYLAND
ready(NULL, NULL);
#else
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);