Skip to content
Snippets Groups Projects
Commit 803519ae authored by Peter Hutterer's avatar Peter Hutterer
Browse files

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: default avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 5b20d7f4
No related branches found
No related tags found
Loading
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment