From 3700b9c642c2a722951acb80b6af7e9ff0fd2563 Mon Sep 17 00:00:00 2001 From: illiliti Date: Sun, 2 Aug 2020 15:50:17 +0300 Subject: [PATCH] check NULL --- udev_device.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/udev_device.c b/udev_device.c index 48f783f..5681cc0 100644 --- a/udev_device.c +++ b/udev_device.c @@ -414,6 +414,10 @@ static void udev_device_set_properties_from_bits(struct udev_device *udev_device parent = udev_device_get_parent_with_subsystem_devtype(parent, "input", NULL); } + if (!parent) { + return; + } + bits_cnt = populate_bit(bits, udev_device_get_property_value(parent, "EV")); abs_cnt = populate_bit(abs_bits, udev_device_get_property_value(parent, "ABS")); rel_cnt = populate_bit(rel_bits, udev_device_get_property_value(parent, "REL"));