Skip to content

Commit

Permalink
Fix boot crash in all-clusters-app on esp32
Browse files Browse the repository at this point in the history
#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 committed Oct 27, 2021
1 parent 30fd6f9 commit a6d9932
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 a6d9932

Please sign in to comment.