mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
fix possible crash for custom_name==nullptr, dev.23
This commit is contained in:
@@ -1 +1 @@
|
||||
#define EMSESP_APP_VERSION "3.7.0-dev.22"
|
||||
#define EMSESP_APP_VERSION "3.7.0-dev.23"
|
||||
|
||||
@@ -134,7 +134,7 @@ StateUpdateResult WebCustomization::update(JsonObject root, WebCustomization & c
|
||||
auto emsEntity = EntityCustomization();
|
||||
emsEntity.product_id = masked_entities["product_id"];
|
||||
emsEntity.device_id = masked_entities["device_id"];
|
||||
emsEntity.custom_name = masked_entities["custom_name"].as<std::string>();
|
||||
emsEntity.custom_name = masked_entities["custom_name"] | "";
|
||||
|
||||
for (const JsonVariant masked_entity_id : masked_entities["entity_ids"].as<JsonArray>()) {
|
||||
if (masked_entity_id.is<std::string>()) {
|
||||
|
||||
Reference in New Issue
Block a user