From 0313b38dd623221a34ac62ee6d06ddffd88360cd Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Fri, 28 Feb 2014 18:16:01 +0100 Subject: [PATCH] wayland: Don't try to disconnect the listener from the signal handler This is not needed since the instance is being destroyed and in fact actively harmful when code called from other handlers disconnects us for other reasons. In that case we might crash because the disconnection doesn't prevent other handlers from running in the current signal emission and thus we try to remove ourselves from an empty list. --- src/wayland/meta-wayland-keyboard.c | 2 -- src/wayland/meta-wayland-pointer.c | 2 -- src/wayland/meta-wayland-surface.c | 1 - 3 files changed, 5 deletions(-) diff --git a/src/wayland/meta-wayland-keyboard.c b/src/wayland/meta-wayland-keyboard.c index c357b77f1..477d56321 100644 --- a/src/wayland/meta-wayland-keyboard.c +++ b/src/wayland/meta-wayland-keyboard.c @@ -222,7 +222,6 @@ keyboard_handle_focus_surface_destroy (struct wl_listener *listener, void *data) { MetaWaylandKeyboard *keyboard = wl_container_of (listener, keyboard, focus_surface_listener); - wl_list_remove (&keyboard->focus_surface_listener.link); keyboard->focus_surface = NULL; if (keyboard->focus_resource) @@ -237,7 +236,6 @@ keyboard_handle_focus_resource_destroy (struct wl_listener *listener, void *data { MetaWaylandKeyboard *keyboard = wl_container_of (listener, keyboard, focus_resource_listener); - wl_list_remove (&keyboard->focus_resource_listener.link); keyboard->focus_resource = NULL; } diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c index e0c9ad21a..2692c85df 100644 --- a/src/wayland/meta-wayland-pointer.c +++ b/src/wayland/meta-wayland-pointer.c @@ -59,7 +59,6 @@ pointer_handle_focus_surface_destroy (struct wl_listener *listener, void *data) { MetaWaylandPointer *pointer = wl_container_of (listener, pointer, focus_surface_listener); - wl_list_remove (&pointer->focus_surface_listener.link); pointer->focus_surface = NULL; if (pointer->focus_resource) @@ -74,7 +73,6 @@ pointer_handle_focus_resource_destroy (struct wl_listener *listener, void *data) { MetaWaylandPointer *pointer = wl_container_of (listener, pointer, focus_resource_listener); - wl_list_remove (&pointer->focus_resource_listener.link); pointer->focus_resource = NULL; } diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c index 315393901..ebf0c52f9 100644 --- a/src/wayland/meta-wayland-surface.c +++ b/src/wayland/meta-wayland-surface.c @@ -82,7 +82,6 @@ surface_handle_buffer_destroy (struct wl_listener *listener, void *data) wl_resource_post_error (surface->resource, WL_DISPLAY_ERROR_INVALID_OBJECT, "Destroyed buffer while it was attached to the surface"); surface->buffer = NULL; - wl_list_remove (&surface->buffer_destroy_listener.link); } static void