Unverified Commit 48f21994 authored by Florian "SpiritCS / sp1ritCS"'s avatar Florian "SpiritCS / sp1ritCS"
Browse files

gdk: gdkevents: added NULL check to `gdk_event_get_axes`

this is to prevent gdk from causing a segfault, when getting event axes
for events that don't have them (i.e. attempting to get pressure from a
mice input device).
parent 6be466b6
......@@ -1183,9 +1183,16 @@ gdk_event_get_axes (GdkEvent *event,
double **axes,
guint *n_axes)
{
gboolean ret;
g_return_val_if_fail (GDK_IS_EVENT (event), FALSE);
return GDK_EVENT_GET_CLASS (event)->get_axes (event, axes, n_axes);
ret = GDK_EVENT_GET_CLASS (event)->get_axes (event, axes, n_axes);
if (*axes == NULL)
return FALSE;
return ret;
}
double *
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment