Skip to content

Commit

Permalink
Fix crash if chip-tool gets an error status response. (#24799)
Browse files Browse the repository at this point in the history
We are trying to do JSON logging without a delegate in that case.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Nov 7, 2024
1 parent b3c024c commit 3c88c7d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/chip-tool/commands/common/RemoteDataModelLogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ CHIP_ERROR LogErrorAsJSON(const chip::app::EventHeader & header, const chip::app

CHIP_ERROR LogErrorAsJSON(const CHIP_ERROR & error)
{
VerifyOrReturnError(gDelegate != nullptr, CHIP_NO_ERROR);

Json::Value value;
chip::app::StatusIB status;
status.InitFromChipError(error);
Expand Down

0 comments on commit 3c88c7d

Please sign in to comment.