diff --git a/src/app/clusters/bindings/BindingManager.cpp b/src/app/clusters/bindings/BindingManager.cpp index c2ca68728080b7..81a7547a7659f2 100644 --- a/src/app/clusters/bindings/BindingManager.cpp +++ b/src/app/clusters/bindings/BindingManager.cpp @@ -25,7 +25,7 @@ namespace { class BindingFabricTableDelegate : public chip::FabricTable::Delegate { - void OnFabricHasChanged(FabricTable & fabricTable, FabricIndex fabricIndex, bool fabricDeleted) override + void OnFabricHasChanged(chip::FabricTable & fabricTable, chip::FabricIndex fabricIndex, bool fabricDeleted) override { // TODO We likely want to do the same thing regardless of fabricDeleted. For // now bailing out early when only update. diff --git a/src/app/clusters/door-lock-server/door-lock-server.cpp b/src/app/clusters/door-lock-server/door-lock-server.cpp index 2f69c839e6c1c8..db4dcfb5aa8973 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server.cpp @@ -55,8 +55,15 @@ DoorLockServer DoorLockServer::instance; class DoorLockClusterFabricDelegate : public chip::FabricTable::Delegate { - void OnFabricDeletedFromStorage(FabricTable & fabricTable, FabricIndex fabricIndex) override + void OnFabricHasChanged(FabricTable & fabricTable, FabricIndex fabricIndex, bool fabricDeleted) override { + // TODO We likely want to do the same thing regardless of fabricDeleted. For + // now bailing out early when only update. + if (!fabricDeleted) + { + return; + } + for (auto endpointId : EnabledEndpointsWithServerCluster(chip::app::Clusters::DoorLock::Id)) { if (!DoorLockServer::Instance().OnFabricRemoved(endpointId, fabricIndex)) diff --git a/src/protocols/secure_channel/CASESession.cpp b/src/protocols/secure_channel/CASESession.cpp index 644c5d67406030..40391fd0f64bf7 100644 --- a/src/protocols/secure_channel/CASESession.cpp +++ b/src/protocols/secure_channel/CASESession.cpp @@ -144,7 +144,10 @@ void CASESession::Clear() mState = State::kInitialized; Crypto::ClearSecretData(mIPK); - mFabricsTable->RemoveFabricDelegate(&mFabricDelegate); + if (mFabricsTable) + { + mFabricsTable->RemoveFabricDelegate(&mFabricDelegate); + } mLocalNodeId = kUndefinedNodeId; mPeerNodeId = kUndefinedNodeId;