From dd0a4e8b10a758ae14fa80b58883ae446a4770ea Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Fri, 21 Aug 2020 19:32:58 +0200 Subject: [PATCH] Fix 9140 --- tasmota/xdrv_23_zigbee_2_devices.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasmota/xdrv_23_zigbee_2_devices.ino b/tasmota/xdrv_23_zigbee_2_devices.ino index 6e1544a41..c513d533f 100644 --- a/tasmota/xdrv_23_zigbee_2_devices.ino +++ b/tasmota/xdrv_23_zigbee_2_devices.ino @@ -582,7 +582,8 @@ uint8_t Z_Devices::findFirstEndpoint(uint16_t shortaddr) const { } void Z_Devices::setStringAttribute(char*& attr, const char * str) { - size_t str_len = str ? strlen(str) : 0; // len, handle both null ptr and zero length string + if (nullptr == str) { return; } // ignore a null parameter + size_t str_len = strlen(str); if ((nullptr == attr) && (0 == str_len)) { return; } // if both empty, don't do anything if (attr) {