summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2015-09-12 12:11:43 -0400
committerAndras Timar <andras.timar@collabora.com>2016-06-12 22:43:43 +0200
commit1ce3fbfa868bda383b89ea1e54a37b8bc44c7be5 (patch)
tree72daa2a4a97211b42c3e8292371a6d624142db0a /vcl
parent0da9ee6aa521b8a5c8606f45d17e796a7e2b1f57 (diff)
vcl: desktop terminate, to dispose objects
In the preinit stage, the Desktop terminate() method is never called when lo_startmain thread is disposing objects. This produces debug assertions and osl assertions. It is forced to call terminate() method, when a tiled rendering case is active then it has a clean disposing objects process. However DBGGUI_DEINIT_SOLARMUTEXCHECK() check is moved at the end to prevent debug assertions solar mutex complains. Change-Id: I4a9b6398296d9150ab748a8d48868a08e7232909 (cherry picked from commit ba29b6ddf4c079a93a8484e95aa42daf2b54a54b) (cherry picked from commit 58c4cd90d34aab5eb13380ef05d67ea7d2aaa225)
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/app/svmain.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index e6f4be145de0..e59f73d7de6c 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -28,6 +28,7 @@
#include "tools/resmgr.hxx"
#include "comphelper/processfactory.hxx"
+#include "comphelper/lok.hxx"
#include "unotools/syslocaleoptions.hxx"
#include "vcl/svapp.hxx"
@@ -449,8 +450,6 @@ void DeInitVCL()
}
pSVData->mpDefaultWin.disposeAndClear();
- DBGGUI_DEINIT_SOLARMUTEXCHECK();
-
if ( pSVData->mpUnoWrapper )
{
try
@@ -458,6 +457,12 @@ void DeInitVCL()
uno::Reference<frame::XDesktop2> const xDesktop = frame::Desktop::create(
comphelper::getProcessComponentContext() );
xDesktop->addEventListener(new VCLUnoWrapperDeleter());
+
+ if (comphelper::LibreOfficeKit::isActive())
+ {
+ SAL_WARN_IF(!xDesktop.is(), "desktop.app", "No Desktop interface");
+ xDesktop->terminate();
+ }
}
catch (uno::Exception const&)
{
@@ -577,6 +582,8 @@ void DeInitVCL()
}
EmbeddedFontsHelper::clearTemporaryFontFiles();
+
+ DBGGUI_DEINIT_SOLARMUTEXCHECK();
}
// only one call is allowed