Skip to content

Commit

Permalink
Fix boot crash in all-clusters-app on esp32 (project-chip#11079)
Browse files Browse the repository at this point in the history
project-chip#10907 added some
identify bits on Linux only but changed the core cluster impl to
assume that those bits are always there.

This change stops assuming that identify is actually configured on
every endpoint that supports it, since nothing enforces that.
  • Loading branch information
bzbarsky-apple authored and JasonLiuZhuoCheng committed Oct 28, 2021
1 parent 01182f1 commit eb2b7ee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/clusters/identify-server/identify-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ static inline void unreg(Identify * inst)

void emberAfIdentifyClusterServerInitCallback(EndpointId endpoint)
{
(void) Clusters::Identify::Attributes::IdentifyType::Set(endpoint, inst(endpoint)->mIdentifyType);
Identify * identify = inst(endpoint);
if (identify != nullptr)
{
(void) Clusters::Identify::Attributes::IdentifyType::Set(endpoint, identify->mIdentifyType);
}
}

static void onIdentifyClusterTick(chip::System::Layer * systemLayer, void * appState)
Expand Down

0 comments on commit eb2b7ee

Please sign in to comment.