summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-10-15 10:55:42 +0300
committerTomaž Vajngerl <tomaz.vajngerl@collabora.com>2014-12-04 23:04:21 +0100
commitdb682ae56bfd7e09414e9aca41d89fa055ae07fd (patch)
tree255490483f66fc6e7ae822708925783ff246bc14 /desktop
parent66974e684643092f2419835705188c6410e0e7db (diff)
The 'bInitialized' state needs to be global, and unset in lo_destroy()
I assume, for lo_destroy() to be useful at all. Not that I know for sure what the exact intended semantics of lo_destroy() and lo_initialize() are. But I assume that the idea is that after lo_destroy() has been called, lo_initialize() can be called again. Change-Id: I2dea26db150d19ed438427e1c119a5297b9bc9c3
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 8a7ffd53b065..04640e707484 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -650,11 +650,12 @@ static void* lo_startmain(void*)
return 0;
}
+static bool bInitialized = false;
+
static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath)
{
LibLibreOffice_Impl* pLib = static_cast<LibLibreOffice_Impl*>(pThis);
- static bool bInitialized = false;
if (bInitialized)
return 1;
@@ -769,10 +770,14 @@ static void lo_destroy(LibreOfficeKit *pThis)
LibLibreOffice_Impl* pLib = static_cast<LibLibreOffice_Impl*>(pThis);
gImpl = NULL;
+ SAL_INFO("lok", "lo_destroy");
+
Application::Quit();
pthread_join(pLib->maThread, NULL);
delete pLib;
+ bInitialized = false;
+ SAL_INFO("lok", "lo_destroy done");
}
}