Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
bzbarsky-apple authored and pull[bot] committed Sep 25, 2023
1 parent 83d65f3 commit 2732025
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
@@ -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);

0 comments on commit 2732025

Please sign in to comment.