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:
gaudryc
2019-01-06 21:58:01 +01:00
parent 14c3614856
commit e1b5aede66

View File

@@ -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 + "]";