From 239e345b2a3aff81f68a6b5a382851f838706ced Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 27 Oct 2021 15:47:41 -0400 Subject: [PATCH] Fix boot crash in all-clusters-app on esp32 https://github.com/project-chip/connectedhomeip/pull/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. --- src/app/clusters/identify-server/identify-server.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/clusters/identify-server/identify-server.cpp b/src/app/clusters/identify-server/identify-server.cpp index 9a326844e7638b..f6eb59f24db719 100644 --- a/src/app/clusters/identify-server/identify-server.cpp +++ b/src/app/clusters/identify-server/identify-server.cpp @@ -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)