loolwsd/ChildSession.cpp | 6 +++++- loolwsd/ChildSession.hpp | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-)
New commits: commit c6454ff9ed0c48465d05dc5314fb3371698b9298 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Fri May 20 17:26:19 2016 -0400 loolwsd: protect against null lok::Document Change-Id: Iffa9c7f708d04bede5d98ba311e499a0874605fc Reviewed-on: https://gerrit.libreoffice.org/25237 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loolwsd/ChildSession.cpp b/loolwsd/ChildSession.cpp index be23b7f..e9e9960 100644 --- a/loolwsd/ChildSession.cpp +++ b/loolwsd/ChildSession.cpp @@ -117,7 +117,11 @@ public: case LOK_CALLBACK_INVALIDATE_TILES: { const auto lokitDoc = _session.getLoKitDocument(); - assert(lokitDoc); + if (lokitDoc == nullptr) + { + return; + } + assert(lokitDoc->pClass); assert(lokitDoc->pClass->getPart); diff --git a/loolwsd/ChildSession.hpp b/loolwsd/ChildSession.hpp index 61557f6..a0e42d9 100644 --- a/loolwsd/ChildSession.hpp +++ b/loolwsd/ChildSession.hpp @@ -48,7 +48,7 @@ public: const std::string& getDocType() const { return _docType; } - LibreOfficeKitDocument *getLoKitDocument() const { return _loKitDocument->get(); } + LibreOfficeKitDocument *getLoKitDocument() const { return (_loKitDocument ? _loKitDocument->get() : nullptr); } void loKitCallback(const int nType, const char* pPayload); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits