desktop/source/lib/lokinteractionhandler.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
New commits: commit d04cf314d44c0ae0cbb135d21436d119f936208c Author: Michael Stahl <[email protected]> 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 a4a60c2..e4c3ee5 100644 --- a/desktop/source/lib/lokinteractionhandler.cxx +++ b/desktop/source/lib/lokinteractionhandler.cxx @@ -115,9 +115,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); } @@ -243,7 +243,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 [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
