mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-18 16:17:30 +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;
|
notFirstChange = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(deviceState.isOn() && deviceState.getBri() <= 0)
|
if((deviceState != null) && deviceState.isOn() && deviceState.getBri() <= 0)
|
||||||
deviceState.setBri(254);
|
deviceState.setBri(254);
|
||||||
|
|
||||||
if(!deviceState.isOn() && (targetBri != null || targetBriInc != null))
|
if((deviceState != null) && !deviceState.isOn() && (targetBri != null || targetBriInc != null))
|
||||||
deviceState.setOn(true);
|
deviceState.setOn(true);
|
||||||
|
|
||||||
responseString = responseString + "]";
|
responseString = responseString + "]";
|
||||||
|
|||||||
Reference in New Issue
Block a user