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 PSONALl committed Dec 2, 2021
1 parent 4c1875b commit 7321e90
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 7321e90

Please sign in to comment.