mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 18:11:05 -05:00
device: Prevent segfault
When disposing a slave device without a master. http://bugzilla.clutter-project.org/show_bug.cgi?id=2655
This commit is contained in:
parent
0b0d4e1239
commit
c836b8c53c
@ -78,11 +78,11 @@ clutter_input_device_dispose (GObject *gobject)
|
|||||||
|
|
||||||
g_free (device->device_name);
|
g_free (device->device_name);
|
||||||
|
|
||||||
|
if (device->associated != NULL)
|
||||||
|
{
|
||||||
if (device->device_mode == CLUTTER_INPUT_MODE_SLAVE)
|
if (device->device_mode == CLUTTER_INPUT_MODE_SLAVE)
|
||||||
_clutter_input_device_remove_slave (device->associated, device);
|
_clutter_input_device_remove_slave (device->associated, device);
|
||||||
|
|
||||||
if (device->associated != NULL)
|
|
||||||
{
|
|
||||||
_clutter_input_device_set_associated_device (device->associated, NULL);
|
_clutter_input_device_set_associated_device (device->associated, NULL);
|
||||||
g_object_unref (device->associated);
|
g_object_unref (device->associated);
|
||||||
device->associated = NULL;
|
device->associated = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user