diff options
author | Benjamin Otte <otte@redhat.com> | 2020-03-05 06:57:26 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2020-03-05 07:59:05 +0100 |
commit | a4ed6fde9d6afa6d1cae66e93d5386edb62373c8 (patch) | |
tree | 091e0e44c0996bf5ae3fc61ac1c979ee54a9d216 | |
parent | dc86c744bf2422c0a5d51c718e8e844033388068 (diff) | |
download | gtk+-a4ed6fde9d6afa6d1cae66e93d5386edb62373c8.tar.gz |
device: Handle missing axis
-rw-r--r-- | gdk/gdkdevice.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdk/gdkdevice.c b/gdk/gdkdevice.c index f21df4e460..ac15dd6499 100644 --- a/gdk/gdkdevice.c +++ b/gdk/gdkdevice.c @@ -1354,11 +1354,15 @@ _gdk_device_translate_surface_coord (GdkDevice *device, { axis_info_x = &axis_info; axis_info_y = find_axis_info (device->axes, GDK_AXIS_Y); + if (axis_info_y == NULL) + return FALSE; } else { axis_info_x = find_axis_info (device->axes, GDK_AXIS_X); axis_info_y = &axis_info; + if (axis_info_x == NULL) + return FALSE; } device_width = axis_info_x->max_value - axis_info_x->min_value; |