mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-16 18:24:36 +00:00
Bug: Possible null pointer dereference in
com.bwssystems.HABridge.hue.HueMulator.formatSuccessHueResponse(StateChangeBody, String, String, DeviceState, Integer, Integer, ColorData, boolean)
This commit is contained in:
@@ -597,10 +597,10 @@ public class HueMulator {
|
||||
notFirstChange = true;
|
||||
}
|
||||
|
||||
if(deviceState.isOn() && deviceState.getBri() <= 0)
|
||||
if((deviceState != null) && deviceState.isOn() && deviceState.getBri() <= 0)
|
||||
deviceState.setBri(254);
|
||||
|
||||
if(!deviceState.isOn() && (targetBri != null || targetBriInc != null))
|
||||
if((deviceState != null) && !deviceState.isOn() && (targetBri != null || targetBriInc != null))
|
||||
deviceState.setOn(true);
|
||||
|
||||
responseString = responseString + "]";
|
||||
|
||||
Reference in New Issue
Block a user