From 85f5db7e739bb524fa8e98c16dc59c95deb9ad66 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Sun, 20 Oct 2019 19:32:29 +0000 Subject: [PATCH] wayland/surface: Reset buffer_destroy_handler_id Syncronized subsurfaces that call into `merge_pending_state` might otherwise not create new destroy handlers, ending up with a invalid handler ids, throwing errors and leaking. https://gitlab.gnome.org/GNOME/mutter/merge_requests/868 (cherry picked from commit 98892391d764d1cf4b32e57367e45f39b10880e4) --- src/wayland/meta-wayland-surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c index 647f05338..163b7c515 100644 --- a/src/wayland/meta-wayland-surface.c +++ b/src/wayland/meta-wayland-surface.c @@ -401,7 +401,7 @@ static void pending_buffer_resource_destroyed (MetaWaylandBuffer *buffer, MetaWaylandPendingState *pending) { - g_signal_handler_disconnect (buffer, pending->buffer_destroy_handler_id); + g_clear_signal_handler (&pending->buffer_destroy_handler_id, buffer); pending->buffer = NULL; }