[gtk/wip/otte/for-master: 1/6] device: Handle missing axis
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/for-master: 1/6] device: Handle missing axis
- Date: Thu, 5 Mar 2020 06:26:19 +0000 (UTC)
commit 18b0b78c1ac8f6f56976688c1da1dc09b290c17a
Author: Benjamin Otte <otte redhat com>
Date: Thu Mar 5 06:57:26 2020 +0100
device: Handle missing axis
gdk/gdkdevice.c | 4 ++++
1 file changed, 4 insertions(+)
---
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]