From 268cc450b65a2f62e71da80d41ddf64b63760d2d Mon Sep 17 00:00:00 2001 From: Ilya Trukhanov Date: Fri, 18 Jan 2019 21:33:23 +0200 Subject: [PATCH] Fix segfault in get_relative_pointer Occurs on subsequent calls to relative_pointer_manager_v1_handle_get_relative_pointer() Steps to reproduce: - run rootston - run examples/relative-pointer - switch to relative pointer more than once Note: if done fast enough it may take more than two switches to crash. --- types/wlr_relative_pointer_v1.c | 1 + 1 file changed, 1 insertion(+) diff --git a/types/wlr_relative_pointer_v1.c b/types/wlr_relative_pointer_v1.c index 99dea6bf..c4690087 100644 --- a/types/wlr_relative_pointer_v1.c +++ b/types/wlr_relative_pointer_v1.c @@ -42,6 +42,7 @@ static void relative_pointer_destroy(struct wlr_relative_pointer_v1 *relative_po wl_list_remove(&relative_pointer->link); wl_list_remove(&relative_pointer->seat_destroy.link); + wl_list_remove(&relative_pointer->pointer_destroy.link); wl_resource_set_user_data(relative_pointer->resource, NULL); free(relative_pointer);