diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-05-08 15:26:22 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-05-10 15:28:16 +0200 |
commit | a99707d2c4f65a6a5fe160ce2b614aca273f0d2d (patch) | |
tree | 48a40d28677bb70a185edf76f76b6d57f9350419 /vcl | |
parent | 015578db97bec8926441a9440de6067937f63143 (diff) |
Resolves: rhbz#144437 make gnome-documents not crash the whole time
accept that once initted that LibreOffice cannot be deinitted and reinited
(without lots of work), but allow the main loop to quit and restart so LOKs
thread can run and exit successfully, new LOK connections will restart the main
loop.
The buckets of global state continues to be valid the whole time this way
Change-Id: Ide54c0df2ce4065f7c192ae8c2cedfaaa2b58d72
Reviewed-on: https://gerrit.libreoffice.org/37399
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/app/svmain.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index 124b11b481ef..2a89d80f60f3 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -90,6 +90,7 @@ #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/frame/Desktop.hpp> +#include <comphelper/lok.hxx> #include <cppuhelper/implbase.hxx> #include <uno/current_context.hxx> @@ -376,6 +377,13 @@ VCLUnoWrapperDeleter::disposing(lang::EventObject const& /* rSource */) void DeInitVCL() { + //rhbz#1444437, when using LibreOffice like a library you can't realistically + //tear everything down and recreate them on the next call, there's too many + //(c++) singletons that point to stuff that gets deleted during shutdown + //which won't be recreated on restart. + if (comphelper::LibreOfficeKit::isActive()) + return; + { SolarMutexReleaser r; // unblock threads blocked on that so we can join ::comphelper::JoinAsyncEventNotifiers(); |