[mutter] wayland: Clear hashtable pointers on meta_wayland_touch_release()



commit baadb75a5ea513d829cc4519e31a2b62d6252c98
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Jul 24 15:10:25 2014 +0200

    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 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/wayland/meta-wayland-touch.c b/src/wayland/meta-wayland-touch.c
index 7ddb80e..e6470c1 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]