diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index 12a0b795f1bdbe..cb86bf94b7e812 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -183,7 +183,7 @@ EmberAfStatus emberAfSetDynamicEndpoint(uint16_t index, EndpointId id, EmberAfEn index = static_cast(realIndex); for (uint16_t i = FIXED_ENDPOINT_COUNT; i < MAX_ENDPOINT_COUNT; i++) { - if (emAfEndpoints[i].endpoint == id) + if (emAfEndpoints[i].endpoint == id && emAfEndpoints[i].endpointType != NULL) { return EMBER_ZCL_STATUS_DUPLICATE_EXISTS; }