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 /desktop/source/lib | |
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 'desktop/source/lib')
-rw-r--r-- | desktop/source/lib/init.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 27af7dddca77..4003d4565df5 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3063,10 +3063,12 @@ static void lo_startmain(void*) { osl_setThreadName("lo_startmain"); - if (GetpApp()) + if (comphelper::SolarMutex::get()) Application::GetSolarMutex().tryToAcquire(); soffice_main(); + + Application::ReleaseSolarMutex(); } static bool bInitialized = false; @@ -3233,6 +3235,7 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char SAL_INFO("lok", "Enabling RequestHandler"); RequestHandler::Enable(false); SAL_INFO("lok", "Starting soffice_main"); + RequestHandler::SetReady(false); pLib->maThread = osl_createThread(lo_startmain, nullptr); SAL_INFO("lok", "Waiting for RequestHandler"); RequestHandler::WaitForReady(); |