From 91da4c557b5f46167ce78576b2e8d5dead81bec1 Mon Sep 17 00:00:00 2001 From: zsugabubus <48559-zsugabubus@users.noreply.gitlab.freedesktop.org> Date: Wed, 20 Apr 2022 17:50:55 +0200 Subject: [PATCH] xwayland: do not double free server on destroy --- xwayland/xwayland.c | 2 ++ 1 file changed, 2 insertions(+) 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); }