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)
|
if (device->axes != NULL)
|
||||||
{
|
{
|
||||||
g_array_free (device->axes, TRUE);
|
g_array_free (device->axes, TRUE);
|
||||||
|
device->axes = NULL;
|
||||||
|
|
||||||
g_object_notify_by_pspec (G_OBJECT (device), obj_props[PROP_N_AXES]);
|
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:
|
default:
|
||||||
info.min_axis = 0;
|
info.min_axis = 0;
|
||||||
info.max_axis = 1;
|
info.max_axis = 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
device->axes = g_array_append_val (device->axes, info);
|
device->axes = g_array_append_val (device->axes, info);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user