mirror of
https://github.com/brl/mutter.git
synced 2024-11-10 07:56:14 -05:00
device: unset the axes array pointer when resetting
Otherwise we'll get a nice realloc() error from glibc.
This commit is contained in:
parent
0e99346915
commit
7a339d1663
@ -975,6 +975,7 @@ _clutter_input_device_reset_axes (ClutterInputDevice *device)
|
||||
if (device->axes != NULL)
|
||||
{
|
||||
g_array_free (device->axes, TRUE);
|
||||
device->axes = NULL;
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (device), obj_props[PROP_N_AXES]);
|
||||
}
|
||||
@ -1025,6 +1026,7 @@ _clutter_input_device_add_axis (ClutterInputDevice *device,
|
||||
default:
|
||||
info.min_axis = 0;
|
||||
info.max_axis = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
device->axes = g_array_append_val (device->axes, info);
|
||||
|
Loading…
Reference in New Issue
Block a user