summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej.hunt@collabora.com>2014-07-18 13:12:25 +0200
committerTomaž Vajngerl <tomaz.vajngerl@collabora.com>2014-12-04 12:23:00 +0100
commit5296fbbc53bcd9c8e177c899417ad1044ecb689f (patch)
treecc909f39ebdbd58f82b1c2792998ab7ed768dd6d /desktop
parentd5b01426f3f8b80e93ff5dec6c159624f51c8dcb (diff)
Fail LOK initialisation if restart is required.
Change-Id: Ia13a3523666147f002b5a5177fd6962d55556f56
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 96313e4f607f..edea4e5fb22e 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -704,6 +704,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);