device-manager-evdev: Fix a segfault on device removal
Master devices have a NULL sysfs path so use g_strcmp0 to handle them without crashing. https://bugzilla.gnome.org/show_bug.cgi?id=712812
This commit is contained in:
parent
7d8f72a60e
commit
05e6bcc666
@ -943,12 +943,9 @@ find_device_by_udev_device (ClutterDeviceManagerEvdev *manager_evdev,
|
||||
{
|
||||
ClutterInputDeviceEvdev *device = l->data;
|
||||
|
||||
if (strcmp (sysfs_path,
|
||||
_clutter_input_device_evdev_get_sysfs_path (device)) == 0)
|
||||
{
|
||||
if (g_strcmp0 (sysfs_path, _clutter_input_device_evdev_get_sysfs_path (device)) == 0)
|
||||
return device;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user