From 341ee3baabf2a28b18bae62ff74deb52f33e1b9c Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Wed, 2 Oct 2024 19:48:20 -0600 Subject: [PATCH] Fix invalid compare --- shared/liboxide/udev.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/shared/liboxide/udev.cpp b/shared/liboxide/udev.cpp index 1b49461b..920e76aa 100644 --- a/shared/liboxide/udev.cpp +++ b/shared/liboxide/udev.cpp @@ -50,7 +50,14 @@ namespace Oxide { void UDev::deviceType(const QString& subsystem, const QString& deviceType, std::function callback){ connect(singleton(), &UDev::event, [callback, subsystem, deviceType](const Device& device){ - if(device.subsystem == subsystem && (deviceType == NULL || device.deviceType == deviceType)){ + if( + device.subsystem == subsystem + && ( + deviceType.isNull() + || deviceType.isEmpty() + || device.deviceType == deviceType + ) + ){ callback(device); } });