From 9d0fdd834e0ee4fd849c6e44dcf11fcfefab6a22 Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Fri, 14 Jun 2024 22:40:50 +0000 Subject: [PATCH] fix assert issue with systemd udev do not call udev_device_get_parent(udev_device_get_parent(dev)) directly as a null return on the parent will cause an assert in udev_device_get_parent --- src/input.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/input.c b/src/input.c index cd07850..bf36bfa 100644 --- a/src/input.c +++ b/src/input.c @@ -1344,7 +1344,9 @@ static int input_device_add(struct udev_device *udev_device) return -1; } - name = udev_device_get_property_value(udev_device_get_parent(udev_device), "NAME"); + name = udev_device_get_parent(udev_device); + if (name) + name = udev_device_get_property_value(name, "NAME"); if ((name != NULL) && (strncmp(name, "\"eventlircd\"", strlen("\"eventlircd\"")) == 0)) { return 0; }