diff options
author | Andrew Chadwick <a.t.chadwick@gmail.com> | 2016-11-19 03:26:29 +0000 |
---|---|---|
committer | Ignacio Casal Quinteiro <icq@gnome.org> | 2016-11-21 19:11:09 +0100 |
commit | 6e197afc4498bf788b498d869d478b03cb7f58d9 (patch) | |
tree | 959cae72a16f01f91d2f760dcd8e4f4e93490f7e /gdk/win32 | |
parent | 7ae83717afda072adf89522616ef22c72611f29d (diff) | |
download | gtk+-6e197afc4498bf788b498d869d478b03cb7f58d9.tar.gz |
wintab: fix skipping of odd-numbered devices
Fix a regression introduced in 4ce6d1060104e7072eec347370999bfd3fe69dc0
which causes devices with an odd-numbered zero-based index in the list
to be passed over incorrectly. This might present as yet another "device
does not send pressure" bug for ~50% of devices out there.
This commit also closes off another potential segfault for wintab_devices
lists which have an odd length.
https://bugzilla.gnome.org/show_bug.cgi?id=774699
Diffstat (limited to 'gdk/win32')
-rw-r--r-- | gdk/win32/gdkdevicemanager-win32.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gdk/win32/gdkdevicemanager-win32.c b/gdk/win32/gdkdevicemanager-win32.c index 7c8794ff59..9f1f39105d 100644 --- a/gdk/win32/gdkdevicemanager-win32.c +++ b/gdk/win32/gdkdevicemanager-win32.c @@ -852,10 +852,9 @@ gdk_device_manager_find_wintab_device (GdkDeviceManagerWin32 *device_manager, GdkDeviceWintab *device; GList *tmp_list; - for (tmp_list = device_manager->wintab_devices; tmp_list; tmp_list = tmp_list->next) + for (tmp_list = device_manager->wintab_devices; tmp_list != NULL; tmp_list = tmp_list->next) { device = tmp_list->data; - tmp_list = tmp_list->next; if (device->hctx == hctx && device->cursor == cursor) |