Commit 116cddba authored by Peter Hutterer's avatar Peter Hutterer

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's avatarPeter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
parent fb4847d2
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment