mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-04 16:40:13 +01:00
Allow libinput_destroy() on a NULL pointer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
c789a0fdd7
commit
4e67b6da39
1 changed files with 3 additions and 0 deletions
|
|
@ -400,6 +400,9 @@ libinput_destroy(struct libinput *libinput)
|
|||
struct libinput_device *device, *next_device;
|
||||
struct libinput_seat *seat, *next_seat;
|
||||
|
||||
if (libinput == NULL)
|
||||
return;
|
||||
|
||||
while ((event = libinput_get_event(libinput)))
|
||||
libinput_event_destroy(event);
|
||||
free(libinput->events);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue