mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -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);
|
||||
|
||||
if (device->device_mode == CLUTTER_INPUT_MODE_SLAVE)
|
||||
_clutter_input_device_remove_slave (device->associated, device);
|
||||
|
||||
if (device->associated != NULL)
|
||||
{
|
||||
if (device->device_mode == CLUTTER_INPUT_MODE_SLAVE)
|
||||
_clutter_input_device_remove_slave (device->associated, device);
|
||||
|
||||
_clutter_input_device_set_associated_device (device->associated, NULL);
|
||||
g_object_unref (device->associated);
|
||||
device->associated = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user