diff --git a/poll_manager.cpp b/poll_manager.cpp index 240684ee6c..fa18373692 100644 --- a/poll_manager.cpp +++ b/poll_manager.cpp @@ -275,7 +275,7 @@ void PollManager::pollTimerFired() pitem.items.clear(); // all done } - if (suffix == RStateOn) + if (suffix == RStateOn && lightNode) { item = r->item(RAttrModelId); @@ -283,7 +283,7 @@ void PollManager::pollTimerFired() { //Thoses devices haven't cluster 0006, and use Cluster specific } - else if (lightNode && lightNode->manufacturerCode() != VENDOR_XIAOMI) // reports + else if (lightNode->manufacturerCode() != VENDOR_XIAOMI) // reports { clusterId = ONOFF_CLUSTER_ID; attributes.push_back(0x0000); // onOff