diff options
author | Andrzej Hunt <andrzej.hunt@collabora.com> | 2014-07-18 13:12:25 +0200 |
---|---|---|
committer | Andrzej Hunt <andrzej@ahunt.org> | 2014-08-19 14:04:58 +0200 |
commit | fccf726acd7ad99b8fbbec21387ac809f454fd85 (patch) | |
tree | 533ee5ad19a0c21bdd8f5aa271878cc059304e8d | |
parent | 292e207cbd4a19fe333b13b954ec595e3371131f (diff) |
Fail LOK initialisation if restart is required.
Change-Id: Ia13a3523666147f002b5a5177fd6962d55556f56
-rw-r--r-- | desktop/source/lib/init.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 05b23809d199..965dc8f204ed 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -717,6 +717,15 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath) pthread_create(&thread, 0, lo_startmain, NULL); OfficeIPCThread::WaitForReady(); + // If the Thread has been disabled again that indicates that a + // restart is required (or in any case we don't have a useable + // process around). + if (!OfficeIPCThread::IsEnabled()) + { + fprintf(stderr, "LOK init failed -- restart required\n"); + return false; + } + Application::EnableHeadlessMode(true); ErrorHandler::RegisterDisplay(aBasicErrorFunc); |