mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-14 04:30:21 +01:00
udev: move check for seat_id down
Don't access the struct until we've verified it is what we want. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
5d66edc9f4
commit
e4a2ce9f03
1 changed files with 3 additions and 2 deletions
|
|
@ -375,14 +375,15 @@ libinput_udev_assign_seat(struct libinput *libinput,
|
|||
|
||||
if (!seat_id)
|
||||
return -1;
|
||||
if (input->seat_id != NULL)
|
||||
return -1;
|
||||
|
||||
if (libinput->interface_backend != &interface_backend) {
|
||||
log_bug_client(libinput, "Mismatching backends.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (input->seat_id != NULL)
|
||||
return -1;
|
||||
|
||||
input->seat_id = strdup(seat_id);
|
||||
|
||||
if (udev_input_enable(&input->base) < 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue