mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-18 00:10:20 +00:00
Bug: Possible null pointer dereference in method
com.bwssystems.HABridge.plugins.broadlink.BroadlinkHome.deviceHandler(CallItem, MultiCommandUtil, String, int, Integer, Integer, ColorData, DeviceDescriptor, String) on exception path
This commit is contained in:
@@ -143,11 +143,14 @@ public class BroadlinkHome implements Home {
|
||||
if(broadlinkMap == null)
|
||||
broadlinkMap = new HashMap<String, BLDevice>();
|
||||
|
||||
if (theDevice != null) {
|
||||
String newId = theDevice.getHost() + "-" + String.format("%04x", theDevice.getDeviceType());
|
||||
if(broadlinkMap.get(newId) == null)
|
||||
if (broadlinkMap.get(newId) == null) {
|
||||
broadlinkMap.put(newId, theDevice);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (theDevice == null) {
|
||||
log.warn("Should not get here, no BroadlinkDevice not available");
|
||||
theReturn = "[{\"error\":{\"type\": 6, \"address\": \"/lights/" + lightId
|
||||
|
||||
Reference in New Issue
Block a user