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,9 +143,12 @@ public class BroadlinkHome implements Home {
|
|||||||
if(broadlinkMap == null)
|
if(broadlinkMap == null)
|
||||||
broadlinkMap = new HashMap<String, BLDevice>();
|
broadlinkMap = new HashMap<String, BLDevice>();
|
||||||
|
|
||||||
String newId = theDevice.getHost() + "-" + String.format("%04x", theDevice.getDeviceType());
|
if (theDevice != null) {
|
||||||
if(broadlinkMap.get(newId) == null)
|
String newId = theDevice.getHost() + "-" + String.format("%04x", theDevice.getDeviceType());
|
||||||
broadlinkMap.put(newId, theDevice);
|
if (broadlinkMap.get(newId) == null) {
|
||||||
|
broadlinkMap.put(newId, theDevice);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (theDevice == null) {
|
if (theDevice == null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user