Skip to content

Commit

Permalink
Fix the check for duplicate endpoints (#12934)
Browse files Browse the repository at this point in the history
  • Loading branch information
chiragatal authored and pull[bot] committed Jan 31, 2024
1 parent d0fd003 commit 1217363
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/util/attribute-storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ EmberAfStatus emberAfSetDynamicEndpoint(uint16_t index, EndpointId id, EmberAfEn
index = static_cast<uint16_t>(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;
}
Expand Down

0 comments on commit 1217363

Please sign in to comment.