mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-04-06 02:01:58 +02:00
Fixed NPE in tracker ip addr (#269)
This commit is contained in:
@@ -43,15 +43,18 @@ public class DataFeedBuilder {
|
||||
HardwareInfo.startHardwareInfo(fbb);
|
||||
HardwareInfo.addFirmwareVersion(fbb, nameOffset);
|
||||
HardwareInfo.addManufacturer(fbb, manufacturerOffset);
|
||||
HardwareInfo
|
||||
.addIpAddress(
|
||||
fbb,
|
||||
Ipv4Address
|
||||
.createIpv4Address(
|
||||
fbb,
|
||||
ByteBuffer.wrap(device.getIpAddress().getAddress()).getInt()
|
||||
)
|
||||
);
|
||||
var ipAddr = device.getIpAddress();
|
||||
if (ipAddr != null && ipAddr.getAddress() != null) {
|
||||
HardwareInfo
|
||||
.addIpAddress(
|
||||
fbb,
|
||||
Ipv4Address
|
||||
.createIpv4Address(
|
||||
fbb,
|
||||
ByteBuffer.wrap(ipAddr.getAddress()).getInt()
|
||||
)
|
||||
);
|
||||
}
|
||||
// BRUH MOMENT
|
||||
// TODO need support: HardwareInfo.addHardwareRevision(fbb,
|
||||
// hardwareRevisionOffset);
|
||||
|
||||
Reference in New Issue
Block a user