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 Feb 6, 2024
1 parent bcc2c89 commit 1093228
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 1093228

Please sign in to comment.