[clutter/clutter-1.16] evdev: fix a crash when reclaiming devices



commit b29115e8836fd5ad61b44bfb5f45a161e9001ce6
Author: Giovanni Campagna <gcampagn redhat com>
Date:   Wed Sep 11 15:39:23 2013 +0200

    evdev: fix a crash when reclaiming devices
    
    That was not how you iterate a list!
    
    https://bugzilla.gnome.org/show_bug.cgi?id=707901

 clutter/evdev/clutter-device-manager-evdev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/clutter/evdev/clutter-device-manager-evdev.c b/clutter/evdev/clutter-device-manager-evdev.c
index 00958c8..9fa774b 100644
--- a/clutter/evdev/clutter-device-manager-evdev.c
+++ b/clutter/evdev/clutter-device-manager-evdev.c
@@ -1469,7 +1469,7 @@ clutter_evdev_reclaim_devices (void)
   clutter_device_manager_evdev_probe_devices (evdev_manager);
 
   memset (key_bits, 0, sizeof (key_bits));
-  for (iter = priv->event_sources; iter; iter++)
+  for (iter = priv->event_sources; iter; iter = iter->next)
     {
       ClutterEventSource *source = iter->data;
       ClutterInputDevice *slave = CLUTTER_INPUT_DEVICE (source->device);


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