[gtk+] wintab tilt: Check return location for validity
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wintab tilt: Check return location for validity
- Date: Tue, 22 Nov 2016 11:16:37 +0000 (UTC)
commit 8fb9d1578d82a496216a632db1c9f50141dedf90
Author: Andrew Chadwick <a t chadwick gmail com>
Date: Tue Nov 22 10:28:40 2016 +0000
wintab tilt: Check return location for validity
https://bugzilla.gnome.org/show_bug.cgi?id=774265
gdk/win32/gdkdevicemanager-win32.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gdk/win32/gdkdevicemanager-win32.c b/gdk/win32/gdkdevicemanager-win32.c
index f88dab7..cd63a77 100644
--- a/gdk/win32/gdkdevicemanager-win32.c
+++ b/gdk/win32/gdkdevicemanager-win32.c
@@ -800,6 +800,8 @@ decode_tilt (gint *axis_data,
{
double az, el;
+ g_return_if_fail (axis_data != NULL);
+
/* The wintab driver for the Wacom ArtPad II reports
* PK_ORIENTATION in CSR_PKTDATA, but the tablet doesn't
* actually sense tilt. Catch this by noticing that the
@@ -810,7 +812,7 @@ decode_tilt (gint *axis_data,
* sensible tilts will need both, so only add the GDK tilt axes
* if both wintab axes are going to be well-behaved in use.
*/
- if ((axes == NULL) || (axis_data == NULL) ||
+ if ((axes == NULL) ||
(axes[0].axResolution == 0) ||
(axes[1].axResolution == 0))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]