mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-05 04:08:03 +02:00
Allow for NULL in libinput_destroy
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
c188943568
commit
2ee299afcc
1 changed files with 4 additions and 0 deletions
|
|
@ -270,6 +270,10 @@ void
|
||||||
udev_input_destroy(struct udev_input *input)
|
udev_input_destroy(struct udev_input *input)
|
||||||
{
|
{
|
||||||
struct libinput_seat *seat, *next;
|
struct libinput_seat *seat, *next;
|
||||||
|
|
||||||
|
if (input == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
udev_input_disable(input);
|
udev_input_disable(input);
|
||||||
list_for_each_safe(seat, next, &input->base.seat_list, link) {
|
list_for_each_safe(seat, next, &input->base.seat_list, link) {
|
||||||
notify_removed_seat(seat);
|
notify_removed_seat(seat);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue