diff --git a/examples/chip-tool/commands/common/RemoteDataModelLogger.cpp b/examples/chip-tool/commands/common/RemoteDataModelLogger.cpp index ccde7acd9781e4..1b397dfe8989d0 100644 --- a/examples/chip-tool/commands/common/RemoteDataModelLogger.cpp +++ b/examples/chip-tool/commands/common/RemoteDataModelLogger.cpp @@ -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);