aboutsummaryrefslogtreecommitdiff
path: root/xwayland/xwayland.c
diff options
context:
space:
mode:
authorzsugabubus <48559-zsugabubus@users.noreply.gitlab.freedesktop.org>2022-04-20 17:50:55 +0200
committerSimon Ser <contact@emersion.fr>2022-04-23 08:08:33 +0000
commit91da4c557b5f46167ce78576b2e8d5dead81bec1 (patch)
tree18da9f6b214b81b62739459269a155ca2ebd5a64 /xwayland/xwayland.c
parent03c88b07ba64185de7183f52f5f3e4875c5c1d5d (diff)
xwayland: do not double free server on destroy
Diffstat (limited to 'xwayland/xwayland.c')
-rw-r--r--xwayland/xwayland.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xwayland/xwayland.c b/xwayland/xwayland.c
index 86e8c6eb..e09b05cf 100644
--- a/xwayland/xwayland.c
+++ b/xwayland/xwayland.c
@@ -29,6 +29,8 @@ struct wlr_xwayland_cursor {
static void handle_server_destroy(struct wl_listener *listener, void *data) {
struct wlr_xwayland *xwayland =
wl_container_of(listener, xwayland, server_destroy);
+ // Server is being destroyed so avoid destroying it once again.
+ xwayland->server = NULL;
wlr_xwayland_destroy(xwayland);
}