Skip to content

Commit 2e939fe

Browse files
committed
Fix issue with missing device version (MacBook Pro x86)
1 parent b7df92c commit 2e939fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java-does-usb/src/main/java/net/codecrete/usb/macos/MacosUSBDeviceRegistry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ private USBDevice createDevice(Long entryID, int service, MemoryAddress deviceIn
169169
Integer usbVersion = IoKitHelper.getPropertyInt(service, "bcdUSB");
170170
Integer deviceVersion = IoKitHelper.getPropertyInt(service, "bcdDevice");
171171
//noinspection ConstantConditions
172-
device.setVersions(usbVersion, deviceVersion);
172+
device.setVersions(usbVersion, deviceVersion != null ? deviceVersion : 0);
173173

174174
return device;
175175
}

0 commit comments

Comments
 (0)