34 lines
1.4 KiB
Diff
34 lines
1.4 KiB
Diff
|
From 8a78c59791ba408c3f03e285b68f9afbac2658d8 Mon Sep 17 00:00:00 2001
|
||
|
From: Rudi Heitbaum <rudi@heitbaum.com>
|
||
|
Date: Wed, 12 Jun 2024 21:45:23 +0000
|
||
|
Subject: [PATCH] PeripheralBusUSBLibUdev: 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
|
||
|
---
|
||
|
.../platform/linux/peripherals/PeripheralBusUSBLibUdev.cpp | 7 ++++++-
|
||
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/xbmc/platform/linux/peripherals/PeripheralBusUSBLibUdev.cpp b/xbmc/platform/linux/peripherals/PeripheralBusUSBLibUdev.cpp
|
||
|
index aeb5e71d9f..3b649652c3 100644
|
||
|
--- a/xbmc/platform/linux/peripherals/PeripheralBusUSBLibUdev.cpp
|
||
|
+++ b/xbmc/platform/linux/peripherals/PeripheralBusUSBLibUdev.cpp
|
||
|
@@ -108,7 +108,12 @@ bool CPeripheralBusUSB::PerformDeviceScan(PeripheralScanResults &results)
|
||
|
|
||
|
if (bContinue)
|
||
|
{
|
||
|
- dev = udev_device_get_parent(udev_device_get_parent(parent));
|
||
|
+ // 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
|
||
|
+ dev = udev_device_get_parent(parent);
|
||
|
+ if (dev)
|
||
|
+ dev = udev_device_get_parent(dev);
|
||
|
if (!dev || !udev_device_get_sysattr_value(dev,"idVendor") || !udev_device_get_sysattr_value(dev, "idProduct"))
|
||
|
bContinue = false;
|
||
|
}
|
||
|
--
|
||
|
2.43.0
|
||
|
|