mirror of
https://github.com/X11Libre/xf86-input-libinput.git
synced 2026-03-24 01:24:04 +00:00
Bail out of PreInit if the parent driver data is NULL
If the parent device is removed before the WorkProc is called, the private data is NULL. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
@@ -2599,9 +2599,12 @@ xf86libinput_pre_init(InputDriverPtr drv,
|
||||
xf86IDrvMsg(pInfo, X_ERROR, "Failed to find parent device\n");
|
||||
goto fail;
|
||||
}
|
||||
xf86IDrvMsg(pInfo, X_INFO, "is a virtual subdevice\n");
|
||||
|
||||
parent_driver_data = parent->private;
|
||||
if (!parent_driver_data) /* parent already removed again */
|
||||
goto fail;
|
||||
|
||||
xf86IDrvMsg(pInfo, X_INFO, "is a virtual subdevice\n");
|
||||
shared_device = xf86libinput_shared_ref(parent_driver_data->shared_device);
|
||||
device = shared_device->device;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user