desktop/source/lib/lokinteractionhandler.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
New commits: commit 85e6cc898c5d5a1d5d60897bef31da9f46b22686 Author: Michael Stahl <mst...@redhat.com> Date: Wed Feb 3 11:38:10 2016 +0100 libreofficekit: CppunitTest_libreofficekit_tiledrendering crashes Need to check that a callback was actually set before calling it. Change-Id: Icb2ca19aec0c74f6695d7286f046dadfe609d68c diff --git a/desktop/source/lib/lokinteractionhandler.cxx b/desktop/source/lib/lokinteractionhandler.cxx index bb287ff..df8345c 100644 --- a/desktop/source/lib/lokinteractionhandler.cxx +++ b/desktop/source/lib/lokinteractionhandler.cxx @@ -114,9 +114,9 @@ void LOKInteractionHandler::postError(css::task::InteractionClassification class std::stringstream aStream; boost::property_tree::write_json(aStream, aTree); - if (m_pLOKDocument) + if (m_pLOKDocument && m_pLOKDocument->mpCallback) m_pLOKDocument->mpCallback(LOK_CALLBACK_ERROR, aStream.str().c_str(), m_pLOKDocument->mpCallbackData); - else + else if (m_pLOKit->mpCallback) m_pLOKit->mpCallback(LOK_CALLBACK_ERROR, aStream.str().c_str(), m_pLOKit->mpCallbackData); } @@ -242,7 +242,8 @@ bool LOKInteractionHandler::handlePasswordRequest(const uno::Sequence<uno::Refer if (!(rRequest >>= passwordRequest)) return false; - if (m_pLOKit->hasOptionalFeature((passwordRequest.IsRequestPasswordToModify) + if (m_pLOKit->mpCallback && + m_pLOKit->hasOptionalFeature((passwordRequest.IsRequestPasswordToModify) ? LOK_FEATURE_DOCUMENT_PASSWORD_TO_MODIFY : LOK_FEATURE_DOCUMENT_PASSWORD)) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits