From 20baec18940f4f842c7230b73b8f3c5e53bc49b6 Mon Sep 17 00:00:00 2001 From: Stefan Triller Date: Thu, 23 May 2019 15:50:22 +0200 Subject: [PATCH] Fix NPE in ColorConverter colorUpdateScheduler was null (#446) Signed-off-by: Stefan Triller --- .../zigbee/internal/converter/ZigBeeConverterColorColor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/internal/converter/ZigBeeConverterColorColor.java b/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/internal/converter/ZigBeeConverterColorColor.java index e2395ebbd..b42a7edad 100644 --- a/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/internal/converter/ZigBeeConverterColorColor.java +++ b/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/internal/converter/ZigBeeConverterColorColor.java @@ -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) { @@ -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());