aboutsummaryrefslogtreecommitdiff
path: root/xwayland
diff options
context:
space:
mode:
authorIlia Bozhinov <ammen99@gmail.com>2020-09-04 13:03:21 +0200
committerSimon Ser <contact@emersion.fr>2020-09-04 17:55:23 +0200
commit3e03f786ee50f22175db3b7422085df2fa2751d8 (patch)
treedb076d992e5501a35bdbbc8617ba40a47ef5e462 /xwayland
parente44bed0c2b77c944e389efd026948d8ef1230cec (diff)
xwayland: disconnect display destroy listener even if xwayland didn't initialize
Diffstat (limited to 'xwayland')
-rw-r--r--xwayland/server.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/xwayland/server.c b/xwayland/server.c
index b257f245..27e9861a 100644
--- a/xwayland/server.c
+++ b/xwayland/server.c
@@ -150,7 +150,13 @@ static void server_finish_process(struct wlr_xwayland_server *server) {
}
static void server_finish_display(struct wlr_xwayland_server *server) {
- if (!server || server->display == -1) {
+ if (!server) {
+ return;
+ }
+
+ wl_list_remove(&server->display_destroy.link);
+
+ if (server->display == -1) {
return;
}
@@ -158,8 +164,6 @@ static void server_finish_display(struct wlr_xwayland_server *server) {
safe_close(server->x_fd[1]);
server->x_fd[0] = server->x_fd[1] = -1;
- wl_list_remove(&server->display_destroy.link);
-
unlink_display_sockets(server->display);
server->display = -1;
server->display_name[0] = '\0';