mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-04 11:40:30 +01:00
tools: record: fix segfault on exit
If we don't supply --with-libinput, the device is NULL so we can't unref it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
5b20d7f482
commit
803519ae59
1 changed files with 2 additions and 1 deletions
|
|
@ -2460,7 +2460,8 @@ main(int argc, char **argv)
|
|||
rc = mainloop(&ctx);
|
||||
out:
|
||||
list_for_each_safe(d, tmp, &ctx.devices, link) {
|
||||
libinput_device_unref(d->device);
|
||||
if (d->device)
|
||||
libinput_device_unref(d->device);
|
||||
free(d->events);
|
||||
free(d->devnode);
|
||||
libevdev_free(d->evdev);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue