desktop/source/lib/init.cxx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
New commits: commit c44a445031a12f6c6e51fcff620d8a3cc94a8c7b Author: Henry Castro <hcas...@collabora.com> Date: Sun Feb 14 16:41:02 2016 -0400 lok: add desktop terminate When lokit is destroyed, the Desktop service is still alive. So in order to avoid debug assertion "Desktop disposed before terminating it", terminate to quit application. Change-Id: Id1391cde516915d915e5321799436e92b444e935 Reviewed-on: https://gerrit.libreoffice.org/22359 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 75c17b4..bb480b3 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2024,14 +2024,26 @@ int lok_preinit(const char* install_path, const char* user_profile_path) static void lo_destroy(LibreOfficeKit* pThis) { + bool bSuccess = false; LibLibreOffice_Impl* pLib = static_cast<LibLibreOffice_Impl*>(pThis); gImpl = nullptr; SAL_INFO("lok", "LO Destroy"); comphelper::LibreOfficeKit::setStatusIndicatorCallback(nullptr, nullptr); + uno::Reference <frame::XDesktop2> xDesktop = frame::Desktop::create ( ::comphelper::getProcessComponentContext() ); + bSuccess = xDesktop.is() && xDesktop->terminate(); + + if (!bSuccess) + { + bSuccess = GetpApp() && GetpApp()->QueryExit(); + } + + if (!bSuccess) + { + Application::Quit(); + } - Application::Quit(); osl_joinWithThread(pLib->maThread); osl_destroyThread(pLib->maThread); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits