Skip to content

Commit

Permalink
Fix invalid compare
Browse files Browse the repository at this point in the history
  • Loading branch information
Eeems committed Oct 3, 2024
1 parent ef634c3 commit 341ee3b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion shared/liboxide/udev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,14 @@ namespace Oxide {

void UDev::deviceType(const QString& subsystem, const QString& deviceType, std::function<void(const Device&)> 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);
}
});
Expand Down

0 comments on commit 341ee3b

Please sign in to comment.