loolwsd/PrisonerSession.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit d36ff0afdab125e72fef23f27b7ed90397e57fb3 Author: Henry Castro <hcas...@collabora.com> Date: Sun Aug 28 08:41:24 2016 -0400 loolwsd: avoid exception, commandName empty diff --git a/loolwsd/PrisonerSession.cpp b/loolwsd/PrisonerSession.cpp index 1dc9cbe..ba3c344 100644 --- a/loolwsd/PrisonerSession.cpp +++ b/loolwsd/PrisonerSession.cpp @@ -203,7 +203,7 @@ bool PrisonerSession::_handleInput(const char *buffer, int length) Poco::JSON::Parser parser; const auto result = parser.parse(stringJSON); const auto& object = result.extract<Poco::JSON::Object::Ptr>(); - const std::string commandName = object->get("commandName").toString(); + const std::string commandName = object->has("commandName") ? object->get("commandName").toString() : ""; if (commandName.find(".uno:CharFontName") != std::string::npos || commandName.find(".uno:StyleApply") != std::string::npos) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits