From 2923b810901e20c16cd7a6b0f8d87d3d1db1b8d0 Mon Sep 17 00:00:00 2001 From: project-repo Date: Mon, 4 Dec 2023 10:39:47 +0100 Subject: [PATCH] Fix use-after-free on exit --- seat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/seat.c b/seat.c index 1a12c0d..80206e9 100644 --- a/seat.c +++ b/seat.c @@ -748,7 +748,8 @@ process_cursor_motion(struct cg_seat *seat, uint32_t time) { break; } } - if(seat->cursor_tile != NULL && seat->cursor_tile != c_tile) { + if(seat->cursor_tile != NULL && seat->cursor_tile != c_tile && + seat->server->running) { ipc_send_event(seat->server, "{\"event_name\":\"cursor_switch_tile\",\"old_output\":" "\"%s\",\"old_output_id\":%d,"