Skip to content

Commit

Permalink
Fix NPE in ColorConverter colorUpdateScheduler was null (openhab#446)
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Triller <[email protected]>
  • Loading branch information
triller-telekom authored and cdjackson committed May 23, 2019
1 parent 7fce690 commit 20baec1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ public class ZigBeeConverterColorColor extends ZigBeeBaseChannelConverter implem

@Override
public boolean initializeDevice() {
colorUpdateScheduler = Executors.newSingleThreadScheduledExecutor();

ZclColorControlCluster serverClusterColorControl = (ZclColorControlCluster) endpoint
.getInputCluster(ZclColorControlCluster.CLUSTER_ID);
if (serverClusterColorControl == null) {
Expand Down Expand Up @@ -185,6 +183,8 @@ public boolean initializeDevice() {

@Override
public boolean initializeConverter() {
colorUpdateScheduler = Executors.newSingleThreadScheduledExecutor();

clusterColorControl = (ZclColorControlCluster) endpoint.getInputCluster(ZclColorControlCluster.CLUSTER_ID);
if (clusterColorControl == null) {
logger.error("{}: Error opening device color controls", endpoint.getIeeeAddress());
Expand Down

0 comments on commit 20baec1

Please sign in to comment.