Bugfix: Add check for attribute::set_val

This commit is contained in:
WangQixiang
2022-07-14 16:57:47 +08:00
committed by WanqQixiang
parent 4cfcf617c9
commit ed13200ebf
@@ -1035,6 +1035,9 @@ EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint_id, Clus
}
/* Update val */
if (val.type == ESP_MATTER_VAL_TYPE_INVALID) {
return EMBER_ZCL_STATUS_FAILURE;
}
attribute::set_val(attribute, &val);
return EMBER_ZCL_STATUS_SUCCESS;
}