From 6d7749898ddafa98381b9d412f01bfde91e84c42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 5 May 2017 19:07:04 +0800 Subject: [PATCH] GdkWaylandWindow: Clear export user data when used It was only cleared when unexported, but we could just as well clear it when its used too. https://bugzilla.gnome.org/show_bug.cgi?id=782109 --- gdk/wayland/gdkwindow-wayland.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c index 82835b595a..94fb116b1c 100644 --- a/gdk/wayland/gdkwindow-wayland.c +++ b/gdk/wayland/gdkwindow-wayland.c @@ -3967,7 +3967,8 @@ xdg_exported_handle (void *data, GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl); impl->exported.callback (window, handle, impl->exported.user_data); - impl->exported.user_data = NULL; + g_clear_pointer (&impl->exported.user_data, + impl->exported.destroy_func); } static const struct zxdg_exported_v1_listener xdg_exported_listener = {