diff --git a/examples/tv-app/android/java/ContentAppCommandDelegate.cpp b/examples/tv-app/android/java/ContentAppCommandDelegate.cpp index caf2d665b8522e..c5c12212fea0fe 100644 --- a/examples/tv-app/android/java/ContentAppCommandDelegate.cpp +++ b/examples/tv-app/android/java/ContentAppCommandDelegate.cpp @@ -219,7 +219,12 @@ Status ContentAppCommandDelegate::InvokeCommand(EndpointId epId, ClusterId clust void ContentAppCommandDelegate::FormatResponseData(CommandHandlerInterface::HandlerContext & handlerContext, const char * response) { handlerContext.SetCommandHandled(); + Json::Reader reader; Json::Value value; + if (!reader.parse(response, value)) + { + return; + } // handle errors from platform-app if (!value[FAILURE_KEY].empty())