Skip to content

Commit

Permalink
fix crash caused by lacking null pointer, which is caused by using wr…
Browse files Browse the repository at this point in the history
…ong cluster id (project-chip#32339)
  • Loading branch information
fessehaeve authored Feb 27, 2024
1 parent 8428564 commit 6d8613d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/clusters/on-off-server/on-off-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,15 @@ class DefaultOnOffSceneHandler : public scenes::DefaultSceneHandlerImpl
ScenesManagement::ScenesServer::Instance().IsHandlerRegistered(endpoint, LevelControlServer::GetSceneHandler())))
#endif
{
VerifyOrReturnError(mTransitionTimeInterface.sceneEventControl(endpoint) != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
OnOffServer::Instance().scheduleTimerCallbackMs(mTransitionTimeInterface.sceneEventControl(endpoint), timeMs);
}

return CHIP_NO_ERROR;
}

private:
OnOffTransitionTimeInterface mTransitionTimeInterface = OnOffTransitionTimeInterface(Attributes::OnOff::Id, sceneOnOffCallback);
OnOffTransitionTimeInterface mTransitionTimeInterface = OnOffTransitionTimeInterface(OnOff::Id, sceneOnOffCallback);
};
static DefaultOnOffSceneHandler sOnOffSceneHandler;

Expand Down

0 comments on commit 6d8613d

Please sign in to comment.