From baadb75a5ea513d829cc4519e31a2b62d6252c98 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Thu, 24 Jul 2014 15:10:25 +0200 Subject: [PATCH] wayland: Clear hashtable pointers on meta_wayland_touch_release() Just in case they are poked while no touch interface is available; https://bugzilla.gnome.org/show_bug.cgi?id=733631 --- src/wayland/meta-wayland-touch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wayland/meta-wayland-touch.c b/src/wayland/meta-wayland-touch.c index 7ddb80ee4..e6470c12b 100644 --- a/src/wayland/meta-wayland-touch.c +++ b/src/wayland/meta-wayland-touch.c @@ -528,8 +528,8 @@ void meta_wayland_touch_release (MetaWaylandTouch *touch) { clutter_evdev_remove_filter (evdev_filter_func, touch); - g_hash_table_unref (touch->touch_surfaces); - g_hash_table_unref (touch->touches); + g_clear_pointer (&touch->touch_surfaces, (GDestroyNotify) g_hash_table_unref); + g_clear_pointer (&touch->touches, (GDestroyNotify) g_hash_table_unref); } void