diff options
author | Andrzej Hunt <andrzej.hunt@collabora.com> | 2014-07-18 13:12:25 +0200 |
---|---|---|
committer | Andrzej Hunt <andrzej.hunt@collabora.com> | 2014-07-26 16:06:32 +0200 |
commit | abbb40ffedc3a102573d412cf3c706be4612a5f3 (patch) | |
tree | 69c42b30235b1fd3a71abc4d8fd613ec22fe8b5e | |
parent | eea31395bb68bc57c69147a2870d0e59e11c6756 (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 76d05f36f880..567f5ae26c6f 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -661,6 +661,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); |