xwayland: do not double free server on destroy

This commit is contained in:
zsugabubus 2022-04-20 17:50:55 +02:00 committed by Simon Ser
parent 03c88b07ba
commit 91da4c557b

View file

@ -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);
}