mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-16 18:24:36 +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)
|
||||
broadlinkMap = new HashMap<String, BLDevice>();
|
||||
|
||||
String newId = theDevice.getHost() + "-" + String.format("%04x", theDevice.getDeviceType());
|
||||
if(broadlinkMap.get(newId) == null)
|
||||
broadlinkMap.put(newId, theDevice);
|
||||
if (theDevice != null) {
|
||||
String newId = theDevice.getHost() + "-" + String.format("%04x", theDevice.getDeviceType());
|
||||
if (broadlinkMap.get(newId) == null) {
|
||||
broadlinkMap.put(newId, theDevice);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (theDevice == null) {
|
||||
|
||||
Reference in New Issue
Block a user